Index: third_party/WebKit/Source/bindings/core/v8/custom/V8WindowCustom.cpp |
diff --git a/third_party/WebKit/Source/bindings/core/v8/custom/V8WindowCustom.cpp b/third_party/WebKit/Source/bindings/core/v8/custom/V8WindowCustom.cpp |
index 0105ff9fbe188e1bcd527955c719b5d5c0758cac..93b32331d31d83abad3eaca073098ab35ca4fede 100644 |
--- a/third_party/WebKit/Source/bindings/core/v8/custom/V8WindowCustom.cpp |
+++ b/third_party/WebKit/Source/bindings/core/v8/custom/V8WindowCustom.cpp |
@@ -56,6 +56,7 @@ |
#include "core/html/HTMLCollection.h" |
#include "core/html/HTMLDocument.h" |
#include "core/inspector/ScriptCallStack.h" |
+#include "core/inspector/v8/V8InjectedScriptHost.h" |
#include "core/loader/FrameLoadRequest.h" |
#include "core/loader/FrameLoader.h" |
#include "core/loader/FrameLoaderClient.h" |
@@ -63,6 +64,7 @@ |
#include "wtf/Assertions.h" |
#include "wtf/OwnPtr.h" |
+ |
pfeldman
2016/01/22 18:26:30
revert
kozy
2016/01/22 19:48:22
Done.
|
namespace blink { |
void V8Window::eventAttributeGetterCustom(const v8::PropertyCallbackInfo<v8::Value>& info) |
@@ -325,6 +327,23 @@ void V8Window::namedPropertyGetterCustom(v8::Local<v8::Name> name, const v8::Pro |
if (installTestInterfaceIfNeeded(toLocalFrame(*frame), nameString, info)) |
return; |
+ v8::Isolate* isolate = info.GetIsolate(); |
pfeldman
2016/01/22 18:26:30
This code is hot, you should make sure you only en
kozy
2016/01/22 19:48:22
Done.
|
+ v8::Local<v8::Context> context = isolate->GetCurrentContext(); |
+ |
+ v8::Local<v8::Symbol> commandLineAPISymbol = v8::Symbol::ForApi(isolate, v8AtomicString(isolate, "commandLineAPISymbol")); |
+ v8::Local<v8::Object> global = context->Global(); |
+ v8::Local<v8::Value> commandLineAPI; |
+ |
+ if (v8Call(global->Get(context, commandLineAPISymbol), commandLineAPI)) { |
+ v8::Local<v8::Value> value; |
+ if (commandLineAPI->IsObject() && v8Call(commandLineAPI->ToObject(isolate)->Get(context, name), value)) { |
+ if (!value->IsUndefined()) { |
+ v8SetReturnValue(info, value); |
+ return; |
+ } |
+ } |
+ } |
+ |
// Search named items in the document. |
Document* doc = toLocalFrame(frame)->document(); |
if (!doc || !doc->isHTMLDocument()) |