Bug 153968

Summary: Attribute getters should not require an explicit 'this' value for Window properties
Product: WebKit Reporter: Chris Dumez <cdumez>
Component: BindingsAssignee: Chris Dumez <cdumez>
Status: RESOLVED FIXED    
Severity: Normal CC: alecflett, barraclough, cgarcia, commit-queue, esprehn+autocc, ggaren, jsbell, kondapallykalyan, oliver
Priority: P2 Keywords: WebExposed
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
WIP Patch
none
Patch
none
Patch none

Chris Dumez
Reported 2016-02-07 17:02:43 PST
Attribute getters should not require an explicit 'this' value for Window properties. This is because the Window interface is marked as [ImplicitThis]: - http://heycam.github.io/webidl/#ImplicitThis - https://www.w3.org/Bugs/Public/show_bug.cgi?id=29421 This matches the behavior of Firefox and the expectations of the W3C web-platform-tests.
Attachments
WIP Patch (90.78 KB, patch)
2016-02-07 17:04 PST, Chris Dumez
no flags
Patch (95.84 KB, patch)
2016-02-07 18:49 PST, Chris Dumez
no flags
Patch (95.85 KB, patch)
2016-02-08 10:30 PST, Chris Dumez
no flags
Chris Dumez
Comment 1 2016-02-07 17:04:01 PST
Created attachment 270833 [details] WIP Patch
Chris Dumez
Comment 2 2016-02-07 18:49:22 PST
Chris Dumez
Comment 3 2016-02-08 10:30:26 PST
Gavin Barraclough
Comment 4 2016-02-08 18:08:47 PST
Comment on attachment 270864 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=270864&action=review > Source/WebCore/bindings/scripts/CodeGeneratorJS.pm:2296 > } OOI could do away with the if/else in the perl & the ?: in the C++ by doing something like this: push(@implContent, " if (decodedThisValue.isUndefinedOrNull()) decodedThisValue = state->thisValue().toThis(state, NotStrictMode);\n") if ($interface->extendedAttributes->{"ImplicitThis"}); push(@implContent, " auto* castedThis = $castingFunction(decodedThisValue);\n"); Not sure if that's really much better tho.
Chris Dumez
Comment 5 2016-02-08 21:15:09 PST
Comment on attachment 270864 [details] Patch Clearing flags on attachment: 270864 Committed r196303: <http://trac.webkit.org/changeset/196303>
Chris Dumez
Comment 6 2016-02-08 21:15:14 PST
All reviewed patches have been landed. Closing bug.
Note You need to log in before you can comment on or make changes to this bug.