Index: src/inspector/inspected-context.cc |
diff --git a/src/inspector/inspected-context.cc b/src/inspector/inspected-context.cc |
index 39ddf29e1da4003501742cfb228db7098e418e04..ef0bfa91d2bbca1ba13b72ca8ac99fc74346e09d 100644 |
--- a/src/inspector/inspected-context.cc |
+++ b/src/inspector/inspected-context.cc |
@@ -48,9 +48,13 @@ InspectedContext::InspectedContext(V8InspectorImpl* inspector, |
v8::Local<v8::Object> global = info.context->Global(); |
v8::Local<v8::Object> console = |
V8Console::createConsole(this, info.hasMemoryOnConsole); |
+ v8::PropertyDescriptor descriptor(console, /* writable */ true); |
+ descriptor.set_enumerable(false); |
+ descriptor.set_configurable(true); |
if (!global |
- ->Set(info.context, toV8StringInternalized(isolate, "console"), |
- console) |
+ ->DefineProperty(info.context, |
dgozman
2016/10/19 00:19:53
What is this formatting?
kozy
2016/10/19 00:54:36
Done.
|
+ toV8StringInternalized(isolate, "console"), |
+ descriptor) |
.FromMaybe(false)) |
return; |
m_console.Reset(isolate, console); |