V8DOMActivityLogger* V8DOMActivityLogger::currentActivityLogger() { v8::Isolate* isolate = v8::Isolate::GetCurrent(); if (!isolate->InContext()) return 0; V8PerContextData* contextData = ScriptState::current(isolate)->perContextData(); if (!contextData) return 0; return contextData->activityLogger(); }
V8DOMActivityLogger* V8DOMActivityLogger::currentActivityLogger() { v8::Isolate* isolate = v8::Isolate::GetCurrent(); if (!isolate->InContext()) return 0; v8::HandleScope handleScope(isolate); v8::Local<v8::Context> context = isolate->GetCurrentContext(); if (context.IsEmpty() || !toDOMWindow(context)) return 0; V8PerContextData* contextData = ScriptState::from(context)->perContextData(); if (!contextData) return 0; return contextData->activityLogger(); }