Bug 148648 - Range API is throwing wrong exception type
Summary: Range API is throwing wrong exception type
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: DOM (show other bugs)
Version: Other
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Chris Dumez
URL:
Keywords: InRadar, WebExposed
Depends on:
Blocks:
 
Reported: 2015-08-31 14:51 PDT by Chris Dumez
Modified: 2015-09-02 13:28 PDT (History)
4 users (show)

See Also:


Attachments
Patch (1.50 MB, patch)
2015-08-31 15:27 PDT, Chris Dumez
no flags Details | Formatted Diff | Diff
Archive of layout-test-results from ews101 for mac-mavericks (695.01 KB, application/zip)
2015-08-31 16:23 PDT, Build Bot
no flags Details
Archive of layout-test-results from ews107 for mac-mavericks-wk2 (640.24 KB, application/zip)
2015-08-31 16:29 PDT, Build Bot
no flags Details
Patch (1.51 MB, patch)
2015-08-31 16:31 PDT, Chris Dumez
no flags Details | Formatted Diff | Diff
Archive of layout-test-results from ews100 for mac-mavericks (656.59 KB, application/zip)
2015-08-31 17:09 PDT, Build Bot
no flags Details
Archive of layout-test-results from ews104 for mac-mavericks-wk2 (727.46 KB, application/zip)
2015-08-31 17:14 PDT, Build Bot
no flags Details
Patch (1.52 MB, patch)
2015-08-31 18:37 PDT, Chris Dumez
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Chris Dumez 2015-08-31 14:51:23 PDT
Range API is currently throwing a RangeException for some type of errors instead of regular DOM exceptions. The error code is also not the one that is expected according to the latest specification.

Firefox and Chrome match the specification and do not have a RangeException type.
Comment 1 Chris Dumez 2015-08-31 15:27:25 PDT
Created attachment 260324 [details]
Patch
Comment 2 Build Bot 2015-08-31 16:23:19 PDT
Comment on attachment 260324 [details]
Patch

Attachment 260324 [details] did not pass mac-ews (mac):
Output: http://webkit-queues.webkit.org/results/127693

New failing tests:
http/tests/security/cross-frame-access-put.html
http/tests/security/cross-frame-access-getOwnPropertyDescriptor.html
http/tests/w3c/dom/historical.html
js/dom/global-constructors-attributes.html
Comment 3 Build Bot 2015-08-31 16:23:22 PDT
Created attachment 260325 [details]
Archive of layout-test-results from ews101 for mac-mavericks

The attached test failures were seen while running run-webkit-tests on the mac-ews.
Bot: ews101  Port: mac-mavericks  Platform: Mac OS X 10.9.5
Comment 4 Build Bot 2015-08-31 16:29:14 PDT
Comment on attachment 260324 [details]
Patch

Attachment 260324 [details] did not pass mac-wk2-ews (mac-wk2):
Output: http://webkit-queues.webkit.org/results/127700

New failing tests:
http/tests/security/cross-frame-access-put.html
http/tests/w3c/dom/historical.html
js/dom/global-constructors-attributes.html
Comment 5 Build Bot 2015-08-31 16:29:17 PDT
Created attachment 260326 [details]
Archive of layout-test-results from ews107 for mac-mavericks-wk2

The attached test failures were seen while running run-webkit-tests on the mac-wk2-ews.
Bot: ews107  Port: mac-mavericks-wk2  Platform: Mac OS X 10.9.5
Comment 6 Chris Dumez 2015-08-31 16:31:47 PDT
Created attachment 260328 [details]
Patch
Comment 7 Ryosuke Niwa 2015-08-31 16:36:18 PDT
Looks like global-constructors-attributes-expected.txt needs to be updated?
Comment 8 Chris Dumez 2015-08-31 16:37:56 PDT
(In reply to comment #7)
> Looks like global-constructors-attributes-expected.txt needs to be updated?

Yes, I only ran the fast/ folder locally :P The latest iteration should take care of it, I was waiting for EWS to confirm before I set the review flag.
Comment 9 Ryosuke Niwa 2015-08-31 16:45:52 PDT
(In reply to comment #8)
> (In reply to comment #7)
> > Looks like global-constructors-attributes-expected.txt needs to be updated?
> 
> Yes, I only ran the fast/ folder locally :P The latest iteration should take
> care of it, I was waiting for EWS to confirm before I set the review flag.

Okay. Are you gonna set r? later?
Comment 10 Ryosuke Niwa 2015-08-31 16:52:40 PDT
Comment on attachment 260328 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=260328&action=review

> Source/WebCore/dom/RangeException.cpp:-2
> - * Copyright (C) 2011 Google Inc. All rights reserved.

It's funny how this is Google-copyrighted.  We probably added these exceptions back in 2011 to match the spec then LOL.
Comment 11 Build Bot 2015-08-31 17:09:05 PDT
Comment on attachment 260328 [details]
Patch

Attachment 260328 [details] did not pass mac-ews (mac):
Output: http://webkit-queues.webkit.org/results/127822

New failing tests:
js/dom/global-constructors-attributes.html
Comment 12 Build Bot 2015-08-31 17:09:08 PDT
Created attachment 260337 [details]
Archive of layout-test-results from ews100 for mac-mavericks

The attached test failures were seen while running run-webkit-tests on the mac-ews.
Bot: ews100  Port: mac-mavericks  Platform: Mac OS X 10.9.5
Comment 13 Build Bot 2015-08-31 17:14:00 PDT
Comment on attachment 260328 [details]
Patch

Attachment 260328 [details] did not pass mac-wk2-ews (mac-wk2):
Output: http://webkit-queues.webkit.org/results/127835

New failing tests:
js/dom/global-constructors-attributes.html
Comment 14 Build Bot 2015-08-31 17:14:03 PDT
Created attachment 260339 [details]
Archive of layout-test-results from ews104 for mac-mavericks-wk2

The attached test failures were seen while running run-webkit-tests on the mac-wk2-ews.
Bot: ews104  Port: mac-mavericks-wk2  Platform: Mac OS X 10.9.5
Comment 15 Chris Dumez 2015-08-31 18:37:48 PDT
Created attachment 260343 [details]
Patch
Comment 16 WebKit Commit Bot 2015-08-31 19:25:29 PDT
Comment on attachment 260343 [details]
Patch

Clearing flags on attachment: 260343

Committed r189202: <http://trac.webkit.org/changeset/189202>
Comment 17 WebKit Commit Bot 2015-08-31 19:25:34 PDT
All reviewed patches have been landed.  Closing bug.
Comment 18 Alexey Proskuryakov 2015-08-31 21:54:14 PDT
This broke windows build (and no, I don't know why EWS would build, but regular bots wouldn't).

  DerivedSources.cpp
c:\cygwin\home\buildbot\slave\win-release\build\webkitbuild\release\obj32\webcore\derivedsources\JSRangeException.h(25): fatal error C1083: Cannot open include file: 'RangeException.h': No such file or directory [C:\cygwin\home\buildbot\slave\win-release\build\Source\WebCore\WebCore.vcxproj\WebCore.vcxproj]
Comment 19 Chris Dumez 2015-08-31 22:04:13 PDT
(In reply to comment #18)
> This broke windows build (and no, I don't know why EWS would build, but
> regular bots wouldn't).
> 
>   DerivedSources.cpp
> c:\cygwin\home\buildbot\slave\win-
> release\build\webkitbuild\release\obj32\webcore\derivedsources\JSRangeExcepti
> on.h(25): fatal error C1083: Cannot open include file: 'RangeException.h':
> No such file or directory
> [C:\cygwin\home\buildbot\slave\win-release\build\Source\WebCore\WebCore.
> vcxproj\WebCore.vcxproj]

Ok, I will look into this now. Thanks.
Comment 20 Chris Dumez 2015-08-31 22:06:48 PDT
(In reply to comment #19)
> (In reply to comment #18)
> > This broke windows build (and no, I don't know why EWS would build, but
> > regular bots wouldn't).
> > 
> >   DerivedSources.cpp
> > c:\cygwin\home\buildbot\slave\win-
> > release\build\webkitbuild\release\obj32\webcore\derivedsources\JSRangeExcepti
> > on.h(25): fatal error C1083: Cannot open include file: 'RangeException.h':
> > No such file or directory
> > [C:\cygwin\home\buildbot\slave\win-release\build\Source\WebCore\WebCore.
> > vcxproj\WebCore.vcxproj]
> 
> Ok, I will look into this now. Thanks.

Actually, if I grep for RangeException in Source/, there is nothing. Also JSRangeException.h is not supposed to exist anymore. I think the bot may simply need a clean build.
Comment 21 Chris Dumez 2015-08-31 22:11:28 PDT
(In reply to comment #20)
> (In reply to comment #19)
> > (In reply to comment #18)
> > > This broke windows build (and no, I don't know why EWS would build, but
> > > regular bots wouldn't).
> > > 
> > >   DerivedSources.cpp
> > > c:\cygwin\home\buildbot\slave\win-
> > > release\build\webkitbuild\release\obj32\webcore\derivedsources\JSRangeExcepti
> > > on.h(25): fatal error C1083: Cannot open include file: 'RangeException.h':
> > > No such file or directory
> > > [C:\cygwin\home\buildbot\slave\win-release\build\Source\WebCore\WebCore.
> > > vcxproj\WebCore.vcxproj]
> > 
> > Ok, I will look into this now. Thanks.
> 
> Actually, if I grep for RangeException in Source/, there is nothing. Also
> JSRangeException.h is not supposed to exist anymore. I think the bot may
> simply need a clean build.

I triggered clean builds on the Windows bots to confirm.
Comment 22 Chris Dumez 2015-09-02 13:28:36 PDT
rdar://problem/22544508