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

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: Updated layout tests. 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..6285bb4c49446c44c59bdcee9f6ecd696aaa4cc8 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* forThisObject(const v8::FunctionCallbackInfo<v8::Value>& info)
haraken 2016/07/22 09:51:01 Nit: 'This' object sounds a bit too vague. I'd pre
Yuki 2016/07/22 10:11:02 Good point. Agreed. Let's name this "forHolderOb
+ {
+ return from(info.Holder()->CreationContext());
+ }
+
+ static ScriptState* forThisObject(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