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

Issue 604833002: Use ExceptionState when converting string arguments to promise methods (Closed)

Created:
6 years, 2 months ago by Jens Widell
Modified:
6 years, 2 months ago
Reviewers:
haraken, yhirano
CC:
blink-reviews, blink-reviews-bindings_chromium.org, arv+blink, abarth-chromium
Base URL:
https://chromium.googlesource.com/chromium/blink.git@master
Project:
blink
Visibility:
Public.

Description

Use ExceptionState when converting string arguments to promise methods A method whose return type is Promise should never throw an exception directly, instead it should return a rejected promise holding the exception that would have been thrown. Because of this, string arguments in such methods were converted using a special macro that extracted the exception from the v8::TryCatch local. Since we want to get rid of that v8::TryCatch local, and also have a V8StringResource::prepare() overload that reports exceptions via an ExceptionState argument, use that for the method-returning-Promise case. BUG=413257 Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=182687

Patch Set 1 #

Total comments: 1
Unified diffs Side-by-side diffs Delta from patch set Stats (+33 lines, -35 lines) Patch
M Source/bindings/core/v8/V8BindingMacros.h View 1 chunk +6 lines, -14 lines 1 comment Download
M Source/bindings/scripts/v8_methods.py View 7 chunks +16 lines, -12 lines 0 comments Download
M Source/bindings/scripts/v8_types.py View 3 chunks +8 lines, -3 lines 0 comments Download
M Source/bindings/tests/results/core/V8TestObject.cpp View 3 chunks +3 lines, -6 lines 0 comments Download

Messages

Total messages: 8 (2 generated)
Jens Widell
PTAL FYI, this CL removes the final argument conversion v8::TryCatch from the generated bindings code.
6 years, 2 months ago (2014-09-25 13:47:50 UTC) #2
Jens Widell
https://codereview.chromium.org/604833002/diff/1/Source/bindings/core/v8/V8BindingMacros.h File Source/bindings/core/v8/V8BindingMacros.h (left): https://codereview.chromium.org/604833002/diff/1/Source/bindings/core/v8/V8BindingMacros.h#oldcode148 Source/bindings/core/v8/V8BindingMacros.h:148: #define TOSTRING_VOID_PROMISE(type, var, value, info) \ This macro was ...
6 years, 2 months ago (2014-09-25 13:51:15 UTC) #3
haraken
LGTM
6 years, 2 months ago (2014-09-25 15:16:00 UTC) #4
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/604833002/1
6 years, 2 months ago (2014-09-25 15:17:00 UTC) #6
commit-bot: I haz the power
Committed patchset #1 (id:1) as 182687
6 years, 2 months ago (2014-09-25 16:00:37 UTC) #7
yhirano
6 years, 2 months ago (2014-09-26 00:53:30 UTC) #8
Message was sent while issue was closed.
lgtm

Powered by Google App Engine
This is Rietveld 408576698