WebKit Bugzilla
New
Browse
Search+
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED INVALID
78191
WebCore::Range's setStart() and setEnd() should be called with exception code variable
https://bugs.webkit.org/show_bug.cgi?id=78191
Summary
WebCore::Range's setStart() and setEnd() should be called with exception code...
Sean Wang
Reported
2012-02-08 18:29:36 PST
The declaration of WebCore::Range::setStart and WebCore::Range::setEnd are: void setStart(PassRefPtr<Node> container, int offset, ExceptionCode& = ASSERT_NO_EXCEPTION); void setEnd(PassRefPtr<Node> container, int offset, ExceptionCode& = ASSERT_NO_EXCEPTION); They assert that the exception code parameter should not be bypassed, but in the WebCore::Range::Range(), it calls them without the ExceptionCode parameter, that will cause an assertion failure. The code is at Source/WebCore/dom/Range.cpp:94 setStart(startContainer, startOffset); setEnd(endContainer, endOffset);
Attachments
Patch
(1.86 KB, patch)
2012-02-08 19:47 PST
,
Sean Wang
ap
: review-
ap
: commit-queue-
Details
Formatted Diff
Diff
View All
Add attachment
proposed patch, testcase, etc.
Sean Wang
Comment 1
2012-02-08 19:47:52 PST
Created
attachment 126225
[details]
Patch
Alexey Proskuryakov
Comment 2
2012-02-09 10:27:51 PST
Comment on
attachment 126225
[details]
Patch This change doesn't make sense to me. The whole reason for having a default argument is to not pass an argument explicitly. Why is passing it explicitly needed in this particular case? Bug description says that an assertion is triggered, but ChangeLog says that no logic is changed. Does this fix an assertion failure or not? If there is an assertion sometimes, what test case triggers it?
Sean Wang
Comment 3
2012-03-28 01:02:53 PDT
Sorry, I misunderstood the macro ASSERT_NO_EXCEPTION. So close this bug.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug