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

Unified Diff: third_party/WebKit/Source/core/inspector/v8/InspectorWrapper.cpp

Issue 1455583002: Pass current script context to InspectorWrapper::unwrap (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: updates Created 5 years, 1 month 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/core/inspector/v8/InspectorWrapper.cpp
diff --git a/third_party/WebKit/Source/core/inspector/v8/InspectorWrapper.cpp b/third_party/WebKit/Source/core/inspector/v8/InspectorWrapper.cpp
index 7acf3088e5b796e66b9a604f82315fb724d558b2..fe2e2bb2114d6411c3a2254b8da7e052d8fdea07 100644
--- a/third_party/WebKit/Source/core/inspector/v8/InspectorWrapper.cpp
+++ b/third_party/WebKit/Source/core/inspector/v8/InspectorWrapper.cpp
@@ -8,6 +8,8 @@
#include "bindings/core/v8/V8ScriptRunner.h"
#include "wtf/RefPtr.h"
+#include <v8-debug.h>
+
namespace blink {
v8::Local<v8::FunctionTemplate> InspectorWrapperBase::createWrapperTemplate(v8::Isolate* isolate, const char* className, const Vector<V8MethodConfiguration>& methods, const Vector<V8AttributeConfiguration>& attributes)
@@ -48,9 +50,10 @@ v8::Local<v8::Object> InspectorWrapperBase::createWrapper(v8::Local<v8::Function
return result;
}
-void* InspectorWrapperBase::unwrap(v8::Local<v8::Object> object, const char* name)
+void* InspectorWrapperBase::unwrap(v8::Local<v8::Context> context, v8::Local<v8::Object> object, const char* name)
{
- v8::Isolate* isolate = object->GetIsolate();
+ ASSERT(context != v8::Debug::GetDebugContext());
+ v8::Isolate* isolate = context->GetIsolate();
v8::Local<v8::Value> value = V8HiddenValue::getHiddenValue(isolate, object, v8InternalizedString(isolate, name));
if (value.IsEmpty())
return nullptr;

Powered by Google App Engine
This is Rietveld 408576698