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

Unified Diff: third_party/WebKit/Source/platform/v8_inspector/InspectedContext.cpp

Issue 2269843002: [DevTools] Improve ConsoleAPI functions string description (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: replaced ->Set( in v8_inspector Created 4 years, 4 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
Index: third_party/WebKit/Source/platform/v8_inspector/InspectedContext.cpp
diff --git a/third_party/WebKit/Source/platform/v8_inspector/InspectedContext.cpp b/third_party/WebKit/Source/platform/v8_inspector/InspectedContext.cpp
index f2bf9527696a53c4bdfc912822727ed8cff2bc79..93b0ea88a876bda3527f2e6bf6cf8bc9bfcaec82 100644
--- a/third_party/WebKit/Source/platform/v8_inspector/InspectedContext.cpp
+++ b/third_party/WebKit/Source/platform/v8_inspector/InspectedContext.cpp
@@ -8,6 +8,7 @@
#include "platform/v8_inspector/V8Console.h"
#include "platform/v8_inspector/V8InspectorImpl.h"
#include "platform/v8_inspector/V8StringUtil.h"
+#include "platform/v8_inspector/V8ValueCopier.h"
#include "platform/v8_inspector/public/V8ContextInfo.h"
#include "platform/v8_inspector/public/V8InspectorClient.h"
@@ -44,7 +45,7 @@ InspectedContext::InspectedContext(V8InspectorImpl* inspector, const V8ContextIn
v8::Isolate* isolate = m_inspector->isolate();
v8::Local<v8::Object> global = info.context->Global();
v8::Local<v8::Object> console = V8Console::createConsole(this, info.hasMemoryOnConsole);
- if (!global->Set(info.context, toV8StringInternalized(isolate, "console"), console).FromMaybe(false))
+ if (!safeCreateDataProperty(info.context, global, toV8StringInternalized(isolate, "console"), console).FromMaybe(false))
return;
m_console.Reset(isolate, console);
m_console.SetWeak(this, &InspectedContext::consoleWeakCallback, v8::WeakCallbackType::kParameter);

Powered by Google App Engine
This is Rietveld 408576698