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

Issue 211333004: Tidy up error reporting for calling-constructor-as-function. (Closed)

Created:
6 years, 9 months ago by sof
Modified:
6 years, 9 months ago
CC:
blink-reviews, Nils Barth (inactive), kojih, arv+blink, jsbell+bindings_chromium.org, sof, kouhei+bindings_chromium.org, abarth-chromium, marja+watch_chromium.org, adamk+blink_chromium.org, Nate Chapin, Inactive, Mike West
Base URL:
https://chromium.googlesource.com/chromium/blink.git@master
Visibility:
Public.

Description

Tidy up error reporting for calling-constructor-as-function. Introduce an ExceptionMessage helper for emitting the desired error message when calling a constructor as a function & have the IDL compiler generate calls to it. At the same time, make 'detail' a required argument to all 'failedToXX' methods on ExceptionMessage -- better if the caller is required to supply meaningful info. R=nbarth@chromium.org,haraken@chromium.org BUG= Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=170037

Patch Set 1 #

Total comments: 7

Patch Set 2 : Re-order ExceptionMessage method decls. #

Patch Set 3 : re-use failedToConstruct() in constructorNotCallableAsFunction(). #

Unified diffs Side-by-side diffs Delta from patch set Stats (+43 lines, -38 lines) Patch
M Source/bindings/templates/interface.cpp View 1 chunk +1 line, -1 line 0 comments Download
M Source/bindings/templates/methods.cpp View 1 chunk +1 line, -1 line 0 comments Download
M Source/bindings/tests/results/V8TestInterface.cpp View 1 chunk +1 line, -1 line 0 comments Download
M Source/bindings/tests/results/V8TestInterfaceConstructor.cpp View 1 chunk +1 line, -1 line 0 comments Download
M Source/bindings/tests/results/V8TestInterfaceConstructor2.cpp View 1 chunk +1 line, -1 line 0 comments Download
M Source/bindings/tests/results/V8TestInterfaceConstructor3.cpp View 1 chunk +1 line, -1 line 0 comments Download
M Source/bindings/tests/results/V8TestInterfaceCustomConstructor.cpp View 1 chunk +1 line, -1 line 0 comments Download
M Source/bindings/tests/results/V8TestInterfaceEventConstructor.cpp View 1 chunk +1 line, -1 line 0 comments Download
M Source/bindings/tests/results/V8TestInterfaceEventTarget.cpp View 1 chunk +1 line, -1 line 0 comments Download
M Source/bindings/tests/results/V8TestInterfaceNamedConstructor.cpp View 1 chunk +1 line, -1 line 0 comments Download
M Source/bindings/tests/results/V8TestInterfaceNamedConstructor2.cpp View 1 chunk +1 line, -1 line 0 comments Download
M Source/bindings/tests/results/V8TestInterfacePython2.cpp View 1 chunk +1 line, -1 line 0 comments Download
M Source/bindings/tests/results/V8TestInterfaceWillBeGarbageCollected.cpp View 1 chunk +1 line, -1 line 0 comments Download
M Source/bindings/tests/results/V8TestNode.cpp View 1 chunk +1 line, -1 line 0 comments Download
M Source/bindings/tests/results/V8TestTypedefs.cpp View 1 chunk +1 line, -1 line 0 comments Download
M Source/bindings/v8/ExceptionMessages.h View 1 4 chunks +23 lines, -23 lines 0 comments Download
M Source/bindings/v8/ExceptionMessages.cpp View 1 2 1 chunk +5 lines, -0 lines 0 comments Download

Messages

Total messages: 13 (0 generated)
sof
Please take a look.
6 years, 9 months ago (2014-03-26 05:12:49 UTC) #1
haraken
LGTM
6 years, 9 months ago (2014-03-26 05:13:32 UTC) #2
Nils Barth (inactive)
Thanks for this Sigbjørn! (Better to put in static bindings, instead of generated ones.) I ...
6 years, 9 months ago (2014-03-26 05:20:07 UTC) #3
sof
https://codereview.chromium.org/211333004/diff/1/Source/bindings/v8/ExceptionMessages.h File Source/bindings/v8/ExceptionMessages.h (right): https://codereview.chromium.org/211333004/diff/1/Source/bindings/v8/ExceptionMessages.h#newcode49 Source/bindings/v8/ExceptionMessages.h:49: static String failedToConstruct(const String& type, const String& detail); On ...
6 years, 9 months ago (2014-03-26 06:18:58 UTC) #4
Nils Barth (inactive)
Thanks for clarification, LGTM (with one nit). https://codereview.chromium.org/211333004/diff/1/Source/bindings/v8/ExceptionMessages.cpp File Source/bindings/v8/ExceptionMessages.cpp (right): https://codereview.chromium.org/211333004/diff/1/Source/bindings/v8/ExceptionMessages.cpp#newcode86 Source/bindings/v8/ExceptionMessages.cpp:86: return "Failed ...
6 years, 9 months ago (2014-03-26 06:31:27 UTC) #5
sof
https://codereview.chromium.org/211333004/diff/1/Source/bindings/v8/ExceptionMessages.cpp File Source/bindings/v8/ExceptionMessages.cpp (right): https://codereview.chromium.org/211333004/diff/1/Source/bindings/v8/ExceptionMessages.cpp#newcode86 Source/bindings/v8/ExceptionMessages.cpp:86: return "Failed to construct '" + type + "': ...
6 years, 9 months ago (2014-03-26 07:37:39 UTC) #6
sof
The CQ bit was checked by sigbjornf@opera.com
6 years, 9 months ago (2014-03-26 07:37:46 UTC) #7
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/sigbjornf@opera.com/211333004/150001
6 years, 9 months ago (2014-03-26 07:37:52 UTC) #8
commit-bot: I haz the power
The CQ bit was unchecked by commit-bot@chromium.org
6 years, 9 months ago (2014-03-26 08:43:42 UTC) #9
commit-bot: I haz the power
Try jobs failed on following builders: tryserver.blink on linux_blink_dbg
6 years, 9 months ago (2014-03-26 08:43:43 UTC) #10
sof
The CQ bit was checked by sigbjornf@opera.com
6 years, 9 months ago (2014-03-26 08:44:37 UTC) #11
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/sigbjornf@opera.com/211333004/150001
6 years, 9 months ago (2014-03-26 08:44:42 UTC) #12
commit-bot: I haz the power
6 years, 9 months ago (2014-03-26 09:43:44 UTC) #13
Message was sent while issue was closed.
Change committed as 170037

Powered by Google App Engine
This is Rietveld 408576698