Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(378)

Unified Diff: src/inspector/inspected-context.cc

Issue 2440503003: Version 5.6.123.1 (cherry-pick) (Closed)
Patch Set: Created 4 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « include/v8-version.h ('k') | test/inspector/console/console-follow-spec.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/inspector/inspected-context.cc
diff --git a/src/inspector/inspected-context.cc b/src/inspector/inspected-context.cc
index 1b5081ff334ac6be926a6fc0fe29a58e4342a358..39ddf29e1da4003501742cfb228db7098e418e04 100644
--- a/src/inspector/inspected-context.cc
+++ b/src/inspector/inspected-context.cc
@@ -48,11 +48,9 @@ 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);
- v8::Local<v8::String> consoleKey = toV8StringInternalized(isolate, "console");
- if (!global->DefineProperty(info.context, consoleKey, descriptor)
+ if (!global
+ ->Set(info.context, toV8StringInternalized(isolate, "console"),
+ console)
.FromMaybe(false))
return;
m_console.Reset(isolate, console);
« no previous file with comments | « include/v8-version.h ('k') | test/inspector/console/console-follow-spec.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698