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

Issue 555133003: Use ExceptionState to throw exceptions when converting arrays (Closed)

Created:
6 years, 3 months ago by Jens Widell
Modified:
6 years, 3 months ago
Reviewers:
haraken, bashi
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 to throw exceptions when converting arrays In the to*NativeArray(), toImplArray() and toImplArguments() helpers, throw all exceptions via an ExceptionState& argument. To facilitate this, also add an ExceptionState& argument to the various NativeValueTraits<>::nativeValue() implementations, and add a V8StringValue::prepare() variant that takes an ExceptionState& argument. BUG=413257 Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=182602

Patch Set 1 #

Total comments: 3

Patch Set 2 : #

Patch Set 3 : rebased #

Patch Set 4 : fix toV8Sequence() #

Total comments: 1

Patch Set 5 : compilation fixes #

Patch Set 6 : more compilation fixes #

Patch Set 7 : fix MessagePortArray conversion #

Total comments: 1

Patch Set 8 : adjust test expectations #

Patch Set 9 : rebased #

Total comments: 4

Patch Set 10 : prepareSimple => prepareFast #

Patch Set 11 : rebased #

Unified diffs Side-by-side diffs Delta from patch set Stats (+337 lines, -265 lines) Patch
M LayoutTests/crypto/aes-cbc-generateKey-parseAlgorithm-failures-expected.txt View 1 2 3 4 5 6 7 1 chunk +2 lines, -2 lines 0 comments Download
M LayoutTests/crypto/unwrapKey-badParameters-expected.txt View 1 2 3 4 5 6 7 1 chunk +1 line, -1 line 0 comments Download
M LayoutTests/fast/canvas/canvas-lineDash-input-sequence.html View 1 2 3 4 5 6 7 1 chunk +1 line, -1 line 0 comments Download
M LayoutTests/fast/canvas/canvas-lineDash-input-sequence-expected.txt View 1 2 3 4 5 6 7 1 chunk +8 lines, -8 lines 0 comments Download
M LayoutTests/fast/events/constructors/message-event-constructor-expected.txt View 1 2 3 4 5 6 7 1 chunk +12 lines, -12 lines 0 comments Download
M LayoutTests/fast/events/init-message-event.html View 1 2 3 4 5 6 7 1 chunk +1 line, -1 line 0 comments Download
M LayoutTests/fast/events/init-message-event-expected.txt View 1 2 3 4 5 6 7 1 chunk +1 line, -1 line 0 comments Download
M LayoutTests/fast/mediastream/MediaStreamConstructor-expected.txt View 1 2 3 4 5 6 7 1 chunk +4 lines, -4 lines 0 comments Download
M Source/bindings/core/v8/Dictionary.h View 1 chunk +1 line, -1 line 0 comments Download
M Source/bindings/core/v8/DictionaryHelperForCore.cpp View 1 2 3 4 5 6 7 8 9 10 2 chunks +12 lines, -17 lines 0 comments Download
M Source/bindings/core/v8/SerializedScriptValue.cpp View 1 2 3 1 chunk +3 lines, -2 lines 0 comments Download
M Source/bindings/core/v8/V8Binding.h View 1 2 3 4 5 6 7 8 9 10 11 chunks +102 lines, -74 lines 0 comments Download
M Source/bindings/core/v8/V8Binding.cpp View 1 2 1 chunk +3 lines, -1 line 0 comments Download
M Source/bindings/core/v8/V8BindingTest.cpp View 1 2 3 4 5 6 7 8 9 10 5 chunks +12 lines, -8 lines 0 comments Download
M Source/bindings/core/v8/V8StringResource.h View 1 2 3 4 5 6 7 8 9 10 3 chunks +33 lines, -8 lines 0 comments Download
M Source/bindings/core/v8/custom/V8ElementCustom.cpp View 1 2 3 4 5 6 7 8 9 10 3 chunks +3 lines, -3 lines 0 comments Download
M Source/bindings/core/v8/custom/V8MessageEventCustom.cpp View 2 chunks +3 lines, -3 lines 0 comments Download
M Source/bindings/core/v8/custom/V8WebGLRenderingContextCustom.cpp View 1 2 3 4 5 6 7 8 9 10 3 chunks +6 lines, -15 lines 0 comments Download
M Source/bindings/scripts/v8_methods.py View 1 2 3 4 5 6 7 8 9 4 chunks +18 lines, -8 lines 0 comments Download
M Source/bindings/scripts/v8_types.py View 1 2 3 4 5 6 7 8 9 10 2 chunks +3 lines, -2 lines 0 comments Download
M Source/bindings/templates/methods.cpp View 1 2 3 4 5 6 7 8 9 10 1 chunk +2 lines, -1 line 0 comments Download
M Source/bindings/tests/results/core/V8TestInterfaceConstructor.cpp View 1 2 3 4 5 6 7 8 9 10 2 chunks +2 lines, -4 lines 0 comments Download
M Source/bindings/tests/results/core/V8TestObject.cpp View 1 2 3 4 5 6 7 8 9 10 30 chunks +90 lines, -73 lines 0 comments Download
M Source/bindings/tests/results/core/V8TestTypedefs.cpp View 1 2 4 chunks +14 lines, -15 lines 0 comments Download

Messages

Total messages: 21 (5 generated)
Jens Widell
PTAL https://codereview.chromium.org/555133003/diff/1/Source/bindings/core/v8/DictionaryHelperForCore.cpp File Source/bindings/core/v8/DictionaryHelperForCore.cpp (right): https://codereview.chromium.org/555133003/diff/1/Source/bindings/core/v8/DictionaryHelperForCore.cpp#newcode278 Source/bindings/core/v8/DictionaryHelperForCore.cpp:278: // FIXME (before landing): We can't use a ...
6 years, 3 months ago (2014-09-11 13:22:31 UTC) #2
haraken
I think bashi-san is solving a similar issue in a similar approach (how to create ...
6 years, 3 months ago (2014-09-11 13:38:13 UTC) #4
haraken
On 2014/09/11 13:38:13, haraken wrote: > I think bashi-san is solving a similar issue in ...
6 years, 3 months ago (2014-09-11 13:38:26 UTC) #5
bashi
On 2014/09/11 13:38:26, haraken wrote: > On 2014/09/11 13:38:13, haraken wrote: > > I think ...
6 years, 3 months ago (2014-09-12 01:06:35 UTC) #6
Jens Widell
https://codereview.chromium.org/555133003/diff/60001/Source/bindings/core/v8/V8Binding.h File Source/bindings/core/v8/V8Binding.h (right): https://codereview.chromium.org/555133003/diff/60001/Source/bindings/core/v8/V8Binding.h#newcode625 Source/bindings/core/v8/V8Binding.h:625: bool toV8Sequence(v8::Handle<v8::Value>, uint32_t& length, v8::Isolate*, ExceptionState&); Extended patch to ...
6 years, 3 months ago (2014-09-12 11:34:39 UTC) #7
Jens Widell
haraken@: Friendly ping? :-)
6 years, 3 months ago (2014-09-24 06:53:02 UTC) #8
bashi
LGTM (Please wait for Haraken-san's review though) https://codereview.chromium.org/555133003/diff/160001/Source/bindings/core/v8/V8Binding.h File Source/bindings/core/v8/V8Binding.h (right): https://codereview.chromium.org/555133003/diff/160001/Source/bindings/core/v8/V8Binding.h#newcode844 Source/bindings/core/v8/V8Binding.h:844: // The ...
6 years, 3 months ago (2014-09-24 08:23:05 UTC) #9
Jens Widell
https://codereview.chromium.org/555133003/diff/160001/Source/bindings/core/v8/V8Binding.h File Source/bindings/core/v8/V8Binding.h (right): https://codereview.chromium.org/555133003/diff/160001/Source/bindings/core/v8/V8Binding.h#newcode844 Source/bindings/core/v8/V8Binding.h:844: // The caller is responsible for reporting a TypeError. ...
6 years, 3 months ago (2014-09-24 08:29:50 UTC) #10
Jens Widell
https://codereview.chromium.org/555133003/diff/160001/Source/bindings/core/v8/V8Binding.h File Source/bindings/core/v8/V8Binding.h (right): https://codereview.chromium.org/555133003/diff/160001/Source/bindings/core/v8/V8Binding.h#newcode844 Source/bindings/core/v8/V8Binding.h:844: // The caller is responsible for reporting a TypeError. ...
6 years, 3 months ago (2014-09-24 08:29:51 UTC) #11
bashi
On 2014/09/24 08:29:51, Jens Widell wrote: > https://codereview.chromium.org/555133003/diff/160001/Source/bindings/core/v8/V8Binding.h > File Source/bindings/core/v8/V8Binding.h (right): > > https://codereview.chromium.org/555133003/diff/160001/Source/bindings/core/v8/V8Binding.h#newcode844 ...
6 years, 3 months ago (2014-09-24 08:34:37 UTC) #12
haraken
Sorry about the review delay. LGTM. https://codereview.chromium.org/555133003/diff/160001/Source/bindings/core/v8/V8StringResource.h File Source/bindings/core/v8/V8StringResource.h (right): https://codereview.chromium.org/555133003/diff/160001/Source/bindings/core/v8/V8StringResource.h#newcode202 Source/bindings/core/v8/V8StringResource.h:202: if (prepareSimple()) prepareFast ...
6 years, 3 months ago (2014-09-24 09:29:49 UTC) #13
Jens Widell
Thank you very much for reviewing, haraken and bashi! https://codereview.chromium.org/555133003/diff/160001/Source/bindings/core/v8/V8StringResource.h File Source/bindings/core/v8/V8StringResource.h (right): https://codereview.chromium.org/555133003/diff/160001/Source/bindings/core/v8/V8StringResource.h#newcode202 Source/bindings/core/v8/V8StringResource.h:202: ...
6 years, 3 months ago (2014-09-24 10:00:19 UTC) #14
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/555133003/200001
6 years, 3 months ago (2014-09-24 11:26:34 UTC) #16
commit-bot: I haz the power
Try jobs failed on following builders: win_blink_rel on tryserver.blink (http://build.chromium.org/p/tryserver.blink/builders/win_blink_rel/builds/28561)
6 years, 3 months ago (2014-09-24 13:04:52 UTC) #18
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/555133003/200001
6 years, 3 months ago (2014-09-24 13:06:45 UTC) #20
commit-bot: I haz the power
6 years, 3 months ago (2014-09-24 14:53:31 UTC) #21
Message was sent while issue was closed.
Committed patchset #11 (id:200001) as 182602

Powered by Google App Engine
This is Rietveld 408576698