Chromium Code Reviews| 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) |