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

Issue 567503002: Add toDouble() helper, and use toFloat()/toDouble() for conversions (Closed)

Created:
6 years, 3 months ago by Jens Widell
Modified:
6 years, 3 months ago
Reviewers:
haraken
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

Add toDouble() helper, and use toFloat()/toDouble() for conversions Like we do for all integer types, use helper functions from V8Binding.h to convert from v8::Value to native types. These helper functions throw all exceptions via their ExceptionState& argument, which means we don't need to initialize a v8::TryCatch in the caller. The helpers initialize a v8::TryCatch if they call in to V8 to convert a value, but they do not do this if the value is already of the correct type. Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=181812

Patch Set 1 #

Total comments: 1
Unified diffs Side-by-side diffs Delta from patch set Stats (+104 lines, -80 lines) Patch
M Source/bindings/core/v8/V8Binding.h View 1 chunk +3 lines, -0 lines 0 comments Download
M Source/bindings/core/v8/V8Binding.cpp View 1 chunk +9 lines, -0 lines 0 comments Download
M Source/bindings/scripts/v8_interface.py View 1 chunk +2 lines, -2 lines 0 comments Download
M Source/bindings/scripts/v8_types.py View 2 chunks +5 lines, -5 lines 0 comments Download
M Source/bindings/templates/interface.cpp View 1 chunk +4 lines, -4 lines 1 comment Download
M Source/bindings/tests/results/core/V8TestInterface.cpp View 6 chunks +20 lines, -16 lines 0 comments Download
M Source/bindings/tests/results/core/V8TestInterface2.cpp View 1 chunk +2 lines, -2 lines 0 comments Download
M Source/bindings/tests/results/core/V8TestInterfaceConstructor.cpp View 1 chunk +1 line, -1 line 0 comments Download
M Source/bindings/tests/results/core/V8TestObject.cpp View 12 chunks +34 lines, -30 lines 0 comments Download
M Source/bindings/tests/results/core/V8TestTypedefs.cpp View 1 chunk +4 lines, -4 lines 0 comments Download
M Source/bindings/tests/results/modules/V8TestInterface5.cpp View 6 chunks +20 lines, -16 lines 0 comments Download

Messages

Total messages: 6 (2 generated)
Jens Widell
PTAL https://codereview.chromium.org/567503002/diff/1/Source/bindings/templates/interface.cpp File Source/bindings/templates/interface.cpp (right): https://codereview.chromium.org/567503002/diff/1/Source/bindings/templates/interface.cpp#newcode284 Source/bindings/templates/interface.cpp:284: {% if setter.has_exception_state %} Moved this since otherwise ...
6 years, 3 months ago (2014-09-11 09:40:54 UTC) #2
haraken
LGTM
6 years, 3 months ago (2014-09-11 11:55:29 UTC) #3
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patchset/567503002/1
6 years, 3 months ago (2014-09-11 11:56:58 UTC) #5
commit-bot: I haz the power
6 years, 3 months ago (2014-09-11 12:00:39 UTC) #6
Message was sent while issue was closed.
Committed patchset #1 (id:1) as 181812

Powered by Google App Engine
This is Rietveld 408576698