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

Issue 131973012: Add overload support for non-wrapper type vs. primitive type (Closed)

Created:
6 years, 11 months ago by Nils Barth (inactive)
Modified:
6 years, 10 months ago
Reviewers:
haraken
CC:
blink-reviews, kojih, arv+blink, jsbell+bindings_chromium.org, sof, abarth-chromium, marja+watch_chromium.org, adamk+blink_chromium.org, haraken, Nate Chapin, watchdog-blink-watchlist_google.com, Inactive, kouhei (in TOK), rjwright
Visibility:
Public.

Description

Add overload support for non-wrapper type vs. primitive type Currently the overload resolution algorithm cannot handle non-wrapper types, notably Dictionary. This is causing problems for Web Animations, as per below CL, specifically for Dictionary vs. double. This is a conservative change, adding basic support for overloading non-wrapper vs. primitive types. This is simple, requiring that definitions appear in a given order: methods with non-wrapper type arguments before methods with primitive type arguments. This bug can't be fixed without completely rewriting the overload algorithm, b/c currently it only processes one method at a time, but actually needs to consider the full overload set all at once, which is much, much more complicated. (Alternatively we could add a !IsObject to all checks of primitive arguments, but that's slow and unnecessary.) Reference CL: Web Animations API: Start implementation of timing input objects. https://codereview.chromium.org/105273010/ BUG=293561 R=haraken Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=165620

Patch Set 1 #

Patch Set 2 : Fix comment #

Patch Set 3 : Fix comment (reupload) #

Patch Set 4 : Rebaseline IDB tests #

Unified diffs Side-by-side diffs Delta from patch set Stats (+83 lines, -8 lines) Patch
M LayoutTests/storage/indexeddb/index-basics-expected.txt View 1 2 3 1 chunk +2 lines, -2 lines 0 comments Download
M LayoutTests/storage/indexeddb/index-basics-workers-expected.txt View 1 2 3 1 chunk +2 lines, -2 lines 0 comments Download
M Source/bindings/scripts/code_generator_v8.pm View 1 2 chunks +21 lines, -2 lines 0 comments Download
M Source/bindings/tests/idls/TestObject.idl View 1 chunk +2 lines, -0 lines 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/V8TestObject.cpp View 2 chunks +54 lines, -0 lines 0 comments Download

Messages

Total messages: 11 (0 generated)
Nils Barth (inactive)
Quick Perl CL per Renée's req. See that correct overload is being computed in: V8TestObject.cpp ...
6 years, 11 months ago (2014-01-23 05:07:55 UTC) #1
haraken
LGTM. This CL is not correct but improves our situation. rjwright: would you check if ...
6 years, 11 months ago (2014-01-23 05:14:06 UTC) #2
Nils Barth (inactive)
As reflected in the change to the constructor test file, this potentially changes existing bindings, ...
6 years, 11 months ago (2014-01-23 05:15:20 UTC) #3
Nils Barth (inactive)
On 2014/01/23 05:14:06, haraken wrote: > LGTM. This CL is not correct but improves our ...
6 years, 11 months ago (2014-01-23 05:20:18 UTC) #4
Nils Barth (inactive)
Test failures due to changed error message: parameter 3 ('options') is not an object => ...
6 years, 11 months ago (2014-01-23 06:15:30 UTC) #5
Nils Barth (inactive)
On 2014/01/23 05:20:18, Nils Barth wrote: > I'll hold off on landing this until verify ...
6 years, 11 months ago (2014-01-23 06:17:06 UTC) #6
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/nbarth@chromium.org/131973012/40007
6 years, 11 months ago (2014-01-23 06:17:20 UTC) #7
Nils Barth (inactive)
On 2014/01/23 06:15:30, Nils Barth wrote: > Joshua, you may be able to remove some ...
6 years, 11 months ago (2014-01-23 06:20:53 UTC) #8
commit-bot: I haz the power
Change committed as 165620
6 years, 11 months ago (2014-01-23 09:21:31 UTC) #9
jsbell
On 2014/01/23 06:20:53, Nils Barth wrote: > So Joshua, nothing to see here for you. ...
6 years, 11 months ago (2014-01-23 17:03:28 UTC) #10
Nils Barth (inactive)
6 years, 10 months ago (2014-02-04 02:18:39 UTC) #11
Message was sent while issue was closed.
This caused a bug:
IndexedDB: createIndex fails if undefined is passed for options
https://code.google.com/p/chromium/issues/detail?id=340458

...resolved in this CL:
IDL: allow optional values to be undefined in overload resolution
https://codereview.chromium.org/152413005/

(We got stricter about undefined, and so we added an explicit test to allow
undefined for optional arguments.)

Powered by Google App Engine
This is Rietveld 408576698