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

Unified Diff: third_party/WebKit/Source/bindings/core/v8/ScriptState.h

Issue 2049493005: binding: Uses the relevant realm instead of the current realm (1 of ?) (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Addressed a review comment. Created 4 years, 5 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/bindings/core/v8/ScriptState.h
diff --git a/third_party/WebKit/Source/bindings/core/v8/ScriptState.h b/third_party/WebKit/Source/bindings/core/v8/ScriptState.h
index 3ef79f0b5970483a4bbaf9b2e2fc9b796e62544f..96dc103cacbff36d8343f785d34e79b5e104c4d6 100644
--- a/third_party/WebKit/Source/bindings/core/v8/ScriptState.h
+++ b/third_party/WebKit/Source/bindings/core/v8/ScriptState.h
@@ -57,6 +57,16 @@ public:
return from(isolate->GetCurrentContext());
}
+ static ScriptState* forHolderObject(const v8::FunctionCallbackInfo<v8::Value>& info)
+ {
+ return from(info.Holder()->CreationContext());
+ }
+
+ static ScriptState* forHolderObject(const v8::PropertyCallbackInfo<v8::Value>& info)
+ {
+ return from(info.Holder()->CreationContext());
+ }
+
// Debugger context doesn't have associated ScriptState and when current
// context is debugger it should be treated as if context stack was empty.
static bool hasCurrentScriptState(v8::Isolate* isolate)

Powered by Google App Engine
This is Rietveld 408576698