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

Unified Diff: third_party/WebKit/Source/bindings/templates/methods.cpp.tmpl

Issue 2418413004: binding: Creates a reject promise always in the current realm. (Closed)
Patch Set: Added a layout test. Created 4 years, 2 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/templates/methods.cpp.tmpl
diff --git a/third_party/WebKit/Source/bindings/templates/methods.cpp.tmpl b/third_party/WebKit/Source/bindings/templates/methods.cpp.tmpl
index 9fadd2c998367138bf123e1bd7ca2d9fe00071ad..cb964bde0a576d122c7d8abab1deb563a6550703 100644
--- a/third_party/WebKit/Source/bindings/templates/methods.cpp.tmpl
+++ b/third_party/WebKit/Source/bindings/templates/methods.cpp.tmpl
@@ -16,12 +16,7 @@ static void {{method.name}}{{method.overload_index}}Method{{world_suffix}}(const
{% if 'exceptionState' in function_call %}
{{define_exception_state}}
{% if method.returns_promise %}
- {% if method.is_static %}
- ScriptState* scriptState = ScriptState::forFunctionObject(info);
- {% else %}
- ScriptState* scriptState = ScriptState::forReceiverObject(info);
- {% endif %}
- ExceptionToRejectPromiseScope rejectPromiseScope(info, scriptState, exceptionState);
+ ExceptionToRejectPromiseScope rejectPromiseScope(info, exceptionState);
{% endif %}
{% endif %}
@@ -407,12 +402,7 @@ static void {{overloads.name}}Method{{world_suffix}}(const v8::FunctionCallbackI
ExceptionState exceptionState(info.GetIsolate(), ExceptionState::ExecutionContext, "{{interface_name}}", "{{overloads.name}}");
{% if overloads.returns_promise_all %}
- {% if overloads.is_static %}
- ScriptState* scriptState = ScriptState::forFunctionObject(info);
- {% else %}
- ScriptState* scriptState = ScriptState::forReceiverObject(info);
- {% endif %}
- ExceptionToRejectPromiseScope rejectPromiseScope(info, scriptState, exceptionState);
+ ExceptionToRejectPromiseScope rejectPromiseScope(info, exceptionState);
{% endif %}
if (isArityError) {

Powered by Google App Engine
This is Rietveld 408576698