WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
Bug 80549
[MutationObservers] Enforce a consistent order of MutationRecord delivery
https://bugs.webkit.org/show_bug.cgi?id=80549
Summary
[MutationObservers] Enforce a consistent order of MutationRecord delivery
Adam Klein
Reported
2012-03-07 15:42:26 PST
[MutationObservers] Enforce a consistent order of MutationRecord delivery
Attachments
Patch
(11.09 KB, patch)
2012-03-07 15:45 PST
,
Adam Klein
no flags
Details
Formatted Diff
Diff
Patch for landing
(11.08 KB, patch)
2012-03-12 12:18 PDT
,
Adam Klein
no flags
Details
Formatted Diff
Diff
Show Obsolete
(1)
View All
Add attachment
proposed patch, testcase, etc.
Adam Klein
Comment 1
2012-03-07 15:45:11 PST
Created
attachment 130713
[details]
Patch
Adam Klein
Comment 2
2012-03-07 15:48:21 PST
The exact ordering is currently specified in
http://dvcs.w3.org/hg/domcore/raw-file/tip/Overview.html#concept-mo-invoke
, but I've suggested a change to the algorithm to match this patch in
http://lists.w3.org/Archives/Public/www-dom/2012JanMar/0145.html
.
Adam Klein
Comment 3
2012-03-12 11:04:55 PDT
This is now ready for review.
Ojan Vafai
Comment 4
2012-03-12 11:17:12 PDT
Comment on
attachment 130713
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=130713&action=review
> Source/WebCore/dom/WebKitMutationObserver.h:98 > + int m_priority;
Are you at all worried about overflow? At the least, this should probably be unsigned, no?
Adam Klein
Comment 5
2012-03-12 11:23:12 PDT
Comment on
attachment 130713
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=130713&action=review
>> Source/WebCore/dom/WebKitMutationObserver.h:98 >> + int m_priority; > > Are you at all worried about overflow? At the least, this should probably be unsigned, no?
I find it unlikely that a renderer would behave reasonably having created 2 billion mutation observers. Making it unsigned doesn't help much (if you've already created 2 billion, why not another 2 billion?). If you think this is something that we should worry about, perhaps a completely different implementation (something better matching the spec, perhaps) could be in order: keeping a list of all living mutation observers, and iterating over that for delivery. But that will behave poorly if we have lots of observers only a few of which are active at a time.
Adam Klein
Comment 6
2012-03-12 12:11:42 PDT
Comment on
attachment 130713
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=130713&action=review
>>> Source/WebCore/dom/WebKitMutationObserver.h:98 >>> + int m_priority; >> >> Are you at all worried about overflow? At the least, this should probably be unsigned, no? > > I find it unlikely that a renderer would behave reasonably having created 2 billion mutation observers. Making it unsigned doesn't help much (if you've already created 2 billion, why not another 2 billion?). > > If you think this is something that we should worry about, perhaps a completely different implementation (something better matching the spec, perhaps) could be in order: keeping a list of all living mutation observers, and iterating over that for delivery. But that will behave poorly if we have lots of observers only a few of which are active at a time.
As per offline discussion, making this unsigned and punting overflow.
Adam Klein
Comment 7
2012-03-12 12:18:13 PDT
Created
attachment 131378
[details]
Patch for landing
WebKit Review Bot
Comment 8
2012-03-12 13:11:33 PDT
Comment on
attachment 131378
[details]
Patch for landing Clearing flags on attachment: 131378 Committed
r110465
: <
http://trac.webkit.org/changeset/110465
>
WebKit Review Bot
Comment 9
2012-03-12 13:11:39 PDT
All reviewed patches have been landed. Closing bug.
Adam Klein
Comment 10
2012-03-21 13:49:34 PDT
***
Bug 79710
has been marked as a duplicate of 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