DescriptionRevert of Throw TypeError when addEventListener or removeEventListener are called without enough arguments (https://codereview.chromium.org/329053002/)
Reason for revert:
Broke Chrome OS tests:
GalleryBrowserTest.CropImageOnDrive
GalleryBrowserTest.CropImageOnDownloads
GalleryBrowserTestInGuestMode.CropImageOnDownloads
https://code.google.com/p/chromium/issues/detail?id=388071
Will add a use counter instead.
Original issue's description:
> Throw TypeError when addEventListener or removeEventListener are called without enough arguments
>
> ** Changes web-facing behavior **
>
> This removes legacy behavior, per request of Tab:
> it fixes some current compatibility problems which *are* causing pain,
> but potentially breaks some old content.
>
> Current behavior (not throwing a TypeError) was for compatibility in 2012,
> though unspecified cause:
> WebKit bug specifically special-casing this in JavaScriptCore bindings is:
> [JSC] Regression: addEventListener() and removeEventListener() raise an exception on missing args
> https://bugs.webkit.org/show_bug.cgi?id=85928
>
> WebKit/Safari also has legacy behavior (matches current Blink/Chrome):
> "For compatibility with legacy content, the EventListener calls are generated without GenerateArgumentsCountCheck."
> http://trac.webkit.org/browser/trunk/Source/WebCore/bindings/scripts/CodeGeneratorJS.pm#L2823
>
> However, IE and Firefox *do* throw (correctly), and this discrepancy is causing
> compatibility problems:
> removeEventListener with only one passed parameter...
> http://lists.w3.org/Archives/Public/public-script-coord/2014AprJun/0166.html
>
> Thus this CL aligns with spec, updating tests and removing legacy tests.
>
> R=haraken
> BUG=353484
> TEST=fast/dom/event-target-arguments.html
>
> Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=176746
TBR=haraken@chromium.org,tabatkins@chromium.org
NOTREECHECKS=true
NOTRY=true
BUG=353484
Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=176800
Patch Set 1 #
Created: 6 years, 6 months ago
(Patch set is too large to download)
Messages
Total messages: 2 (0 generated)
|