WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
156890
Drop [UsePointersEvenForNonNullableObjectArguments] from MutationObserver
https://bugs.webkit.org/show_bug.cgi?id=156890
Summary
Drop [UsePointersEvenForNonNullableObjectArguments] from MutationObserver
Chris Dumez
Reported
2016-04-21 20:13:49 PDT
Drop [UsePointersEvenForNonNullableObjectArguments] from MutationObserver
Attachments
Patch
(21.04 KB, patch)
2016-04-21 21:18 PDT
,
Chris Dumez
no flags
Details
Formatted Diff
Diff
Patch
(20.88 KB, patch)
2016-04-22 08:11 PDT
,
Chris Dumez
no flags
Details
Formatted Diff
Diff
Show Obsolete
(1)
View All
Add attachment
proposed patch, testcase, etc.
Chris Dumez
Comment 1
2016-04-21 21:18:21 PDT
Created
attachment 277005
[details]
Patch
Darin Adler
Comment 2
2016-04-21 22:26:09 PDT
Comment on
attachment 277005
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=277005&action=review
> Source/WebCore/bindings/js/JSMutationObserverCustom.cpp:58 > + Ref<JSMutationCallback> callback = JSMutationCallback::create(object, jsConstructor->globalObject()); > + JSObject* jsObserver = asObject(toJS(exec, jsConstructor->globalObject(), MutationObserver::create(WTFMove(callback))));
I would have used auto here or maybe even put everything on one line!
> Source/WebCore/dom/ChildListMutationScope.cpp:133 > + Ref<NodeList> addedNodes = StaticNodeList::adopt(m_addedNodes); > + Ref<NodeList> removedNodes = StaticNodeList::adopt(m_removedNodes); > + Ref<MutationRecord> record = MutationRecord::createChildList(m_target, WTFMove(addedNodes), WTFMove(removedNodes), WTFMove(m_previousSibling), WTFMove(m_nextSibling)); > + m_observers->enqueueMutationRecord(WTFMove(record));
I would have used auto here more. Or not used local variables so much. Or some of each.
> Source/WebCore/dom/MutationObserverInterestGroup.cpp:82 > + observer->enqueueMutationRecord(*mutationWithNullOldValue);
This should be mutationWithNullOldValue.releaseNonNull().
Chris Dumez
Comment 3
2016-04-22 08:10:17 PDT
Comment on
attachment 277005
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=277005&action=review
>> Source/WebCore/dom/MutationObserverInterestGroup.cpp:82 >> + observer->enqueueMutationRecord(*mutationWithNullOldValue); > > This should be mutationWithNullOldValue.releaseNonNull().
I think this may change behavior since this is in a for loop and we check if mutationWithNullOldValue is null earlier.
Chris Dumez
Comment 4
2016-04-22 08:11:07 PDT
Created
attachment 277061
[details]
Patch
WebKit Commit Bot
Comment 5
2016-04-22 08:58:50 PDT
Comment on
attachment 277061
[details]
Patch Clearing flags on attachment: 277061 Committed
r199878
: <
http://trac.webkit.org/changeset/199878
>
WebKit Commit Bot
Comment 6
2016-04-22 08:58:58 PDT
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.
Top of Page
Format For Printing
XML
Clone This Bug