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

Issue 309553002: Add ByteString support to IDL bindings (Closed)

Created:
6 years, 6 months ago by jsbell
Modified:
6 years, 6 months ago
CC:
blink-reviews, watchdog-blink-watchlist_google.com, blink-reviews-bindings_chromium.org, arv+blink, Inactive, abarth-chromium
Visibility:
Public.

Description

Add ByteString support to IDL bindings ByteString is like DOMString, but should throw TypeError during the V8->C++ hop if script tries to set a string with a code unit greater than 0x00FF. No enforcement is done on the C++->V8 side. R=nbarth@chromium.org BUG=347426 Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=175995

Patch Set 1 #

Total comments: 16

Patch Set 2 : Review feedback, MOAR tests #

Patch Set 3 : Add [Default=NullString] support #

Total comments: 5
Unified diffs Side-by-side diffs Delta from patch set Stats (+164 lines, -8 lines) Patch
M LayoutTests/fast/js/webidl-type-mapping.html View 1 2 1 chunk +17 lines, -0 lines 0 comments Download
M LayoutTests/fast/js/webidl-type-mapping-expected.txt View 1 2 1 chunk +20 lines, -0 lines 0 comments Download
M Source/bindings/scripts/idl_types.py View 1 2 chunks +4 lines, -2 lines 0 comments Download
M Source/bindings/scripts/v8_attributes.py View 1 1 chunk +1 line, -1 line 0 comments Download
M Source/bindings/scripts/v8_methods.py View 1 2 2 chunks +2 lines, -2 lines 0 comments Download
M Source/bindings/scripts/v8_types.py View 1 6 chunks +6 lines, -3 lines 0 comments Download
M Source/bindings/tests/idls/TestObject.idl View 1 3 chunks +3 lines, -0 lines 0 comments Download
M Source/bindings/tests/results/V8TestObject.cpp View 1 2 6 chunks +70 lines, -0 lines 0 comments Download
M Source/bindings/v8/V8Binding.h View 1 1 chunk +3 lines, -0 lines 0 comments Download
M Source/bindings/v8/V8Binding.cpp View 1 2 1 chunk +25 lines, -0 lines 5 comments Download
M Source/bindings/v8/V8StringResource.h View 1 1 chunk +5 lines, -0 lines 0 comments Download
M Source/core/testing/TypeConversions.h View 2 chunks +4 lines, -0 lines 0 comments Download
M Source/core/testing/TypeConversions.idl View 1 2 1 chunk +4 lines, -0 lines 0 comments Download

Messages

Total messages: 20 (0 generated)
jsbell
nbarth@ - please take a look? I tackled this since it came up with ServiceWorker ...
6 years, 6 months ago (2014-05-29 18:33:21 UTC) #1
jsbell
On 2014/05/29 18:33:21, jsbell wrote: > nbarth@ - please take a look? > > I ...
6 years, 6 months ago (2014-05-30 16:02:16 UTC) #2
jsbell
https://codereview.chromium.org/309553002/diff/1/LayoutTests/fast/js/webidl-type-mapping.html File LayoutTests/fast/js/webidl-type-mapping.html (right): https://codereview.chromium.org/309553002/diff/1/LayoutTests/fast/js/webidl-type-mapping.html#newcode584 LayoutTests/fast/js/webidl-type-mapping.html:584: evalAndLog("converter.testByteString = '!@#123ABCabc\\x00\\x80\\xFF\\r\\n\\t'"); I need to add a case ...
6 years, 6 months ago (2014-05-30 19:14:54 UTC) #3
jsbell
Also, this may require additional hackery to support [Default=NullString] if we need that.
6 years, 6 months ago (2014-05-30 19:16:23 UTC) #4
jsbell
https://codereview.chromium.org/309553002/diff/1/Source/bindings/v8/V8Binding.cpp File Source/bindings/v8/V8Binding.cpp (right): https://codereview.chromium.org/309553002/diff/1/Source/bindings/v8/V8Binding.cpp#newcode497 Source/bindings/v8/V8Binding.cpp:497: String string = toCoreString(value.As<v8::String>()); Yeah, this As<v8::String> is bogus ...
6 years, 6 months ago (2014-05-30 21:53:28 UTC) #5
Nils Barth (inactive)
On 2014/05/30 19:16:23, jsbell wrote: > Also, this may require additional hackery to support [Default=NullString] ...
6 years, 6 months ago (2014-06-02 03:09:49 UTC) #6
Nils Barth (inactive)
On 2014/05/29 18:33:21, jsbell wrote: > I tackled this since it came up with ServiceWorker ...
6 years, 6 months ago (2014-06-02 03:19:32 UTC) #7
Nils Barth (inactive)
Various nits, one substantive issue (C++ conversion), generally looks fine -- thanks! https://codereview.chromium.org/309553002/diff/1/Source/bindings/scripts/idl_types.py File Source/bindings/scripts/idl_types.py ...
6 years, 6 months ago (2014-06-02 03:20:16 UTC) #8
jsbell
Thanks for the initial look. This should be much better, but should still be inspected ...
6 years, 6 months ago (2014-06-03 23:22:36 UTC) #9
jsbell
Added [Default=NullString] support + tests, so that it's not bolted on by the ScalarValueString patch. ...
6 years, 6 months ago (2014-06-10 18:16:58 UTC) #10
Nils Barth (inactive)
LGTM, thanks for a great CL!
6 years, 6 months ago (2014-06-11 03:25:14 UTC) #11
haraken
https://codereview.chromium.org/309553002/diff/40001/Source/bindings/v8/V8Binding.cpp File Source/bindings/v8/V8Binding.cpp (right): https://codereview.chromium.org/309553002/diff/40001/Source/bindings/v8/V8Binding.cpp#newcode505 Source/bindings/v8/V8Binding.cpp:505: String x = toCoreString(stringObject); I'm not quite sure, but ...
6 years, 6 months ago (2014-06-11 03:54:52 UTC) #12
Nils Barth (inactive)
https://codereview.chromium.org/309553002/diff/40001/Source/bindings/v8/V8Binding.cpp File Source/bindings/v8/V8Binding.cpp (right): https://codereview.chromium.org/309553002/diff/40001/Source/bindings/v8/V8Binding.cpp#newcode505 Source/bindings/v8/V8Binding.cpp:505: String x = toCoreString(stringObject); On 2014/06/11 03:54:52, haraken wrote: ...
6 years, 6 months ago (2014-06-11 03:59:47 UTC) #13
jsbell
https://codereview.chromium.org/309553002/diff/40001/Source/bindings/v8/V8Binding.cpp File Source/bindings/v8/V8Binding.cpp (right): https://codereview.chromium.org/309553002/diff/40001/Source/bindings/v8/V8Binding.cpp#newcode505 Source/bindings/v8/V8Binding.cpp:505: String x = toCoreString(stringObject); On 2014/06/11 03:59:47, Nils Barth ...
6 years, 6 months ago (2014-06-11 16:55:07 UTC) #14
jsbell
https://codereview.chromium.org/309553002/diff/40001/Source/bindings/v8/V8Binding.cpp File Source/bindings/v8/V8Binding.cpp (right): https://codereview.chromium.org/309553002/diff/40001/Source/bindings/v8/V8Binding.cpp#newcode505 Source/bindings/v8/V8Binding.cpp:505: String x = toCoreString(stringObject); And to be clear, the ...
6 years, 6 months ago (2014-06-11 16:57:43 UTC) #15
haraken
https://codereview.chromium.org/309553002/diff/40001/Source/bindings/v8/V8Binding.cpp File Source/bindings/v8/V8Binding.cpp (right): https://codereview.chromium.org/309553002/diff/40001/Source/bindings/v8/V8Binding.cpp#newcode505 Source/bindings/v8/V8Binding.cpp:505: String x = toCoreString(stringObject); On 2014/06/11 16:57:43, jsbell wrote: ...
6 years, 6 months ago (2014-06-11 23:55:17 UTC) #16
jsbell
The CQ bit was checked by jsbell@chromium.org
6 years, 6 months ago (2014-06-12 00:03:34 UTC) #17
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/jsbell@chromium.org/309553002/40001
6 years, 6 months ago (2014-06-12 00:03:45 UTC) #18
commit-bot: I haz the power
FYI, CQ is re-trying this CL (attempt #1). The failing builders are: win_blink_rel on tryserver.blink ...
6 years, 6 months ago (2014-06-12 03:43:34 UTC) #19
commit-bot: I haz the power
6 years, 6 months ago (2014-06-12 06:00:27 UTC) #20
Message was sent while issue was closed.
Change committed as 175995

Powered by Google App Engine
This is Rietveld 408576698