WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
102328
MutationObserver wrapper should not be collected while still observing
https://bugs.webkit.org/show_bug.cgi?id=102328
Summary
MutationObserver wrapper should not be collected while still observing
Elliott Sprehn
Reported
2012-11-14 21:34:03 PST
MutationObserver wrapper should not be collected while still observing
Attachments
Patch
(9.89 KB, patch)
2012-11-14 21:36 PST
,
Elliott Sprehn
no flags
Details
Formatted Diff
Diff
Patch
(9.85 KB, patch)
2012-11-14 22:26 PST
,
Elliott Sprehn
no flags
Details
Formatted Diff
Diff
Patch for landing
(9.85 KB, patch)
2012-11-15 10:34 PST
,
Elliott Sprehn
no flags
Details
Formatted Diff
Diff
Patch
(10.86 KB, patch)
2012-11-19 16:59 PST
,
Adam Klein
no flags
Details
Formatted Diff
Diff
Patch for landing
(15.33 KB, patch)
2012-11-19 17:19 PST
,
Adam Klein
no flags
Details
Formatted Diff
Diff
Show Obsolete
(4)
View All
Add attachment
proposed patch, testcase, etc.
Elliott Sprehn
Comment 1
2012-11-14 21:36:23 PST
Created
attachment 174338
[details]
Patch
Early Warning System Bot
Comment 2
2012-11-14 21:49:12 PST
Comment on
attachment 174338
[details]
Patch
Attachment 174338
[details]
did not pass qt-ews (qt): Output:
http://queues.webkit.org/results/14834626
Early Warning System Bot
Comment 3
2012-11-14 21:51:53 PST
Comment on
attachment 174338
[details]
Patch
Attachment 174338
[details]
did not pass qt-wk2-ews (qt): Output:
http://queues.webkit.org/results/14847258
EFL EWS Bot
Comment 4
2012-11-14 22:10:50 PST
Comment on
attachment 174338
[details]
Patch
Attachment 174338
[details]
did not pass efl-ews (efl): Output:
http://queues.webkit.org/results/14831650
Elliott Sprehn
Comment 5
2012-11-14 22:26:04 PST
Created
attachment 174350
[details]
Patch Woops, deleted too many lines from the JSC code.
Adam Barth
Comment 6
2012-11-15 10:23:47 PST
Comment on
attachment 174350
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=174350&action=review
> Source/WebCore/dom/MutationObserver.cpp:60 > -PassRefPtr<MutationObserver> MutationObserver::create(PassRefPtr<MutationCallback> callback) > +PassRefPtr<MutationObserver> MutationObserver::create(PassRefPtr<MutationCallback> callback, ScriptExecutionContext* context)
Don't we usually pass the ScriptExecutionContext as the first argument?
Elliott Sprehn
Comment 7
2012-11-15 10:30:43 PST
(In reply to
comment #6
)
> (From update of
attachment 174350
[details]
) > View in context:
https://bugs.webkit.org/attachment.cgi?id=174350&action=review
> > > Source/WebCore/dom/MutationObserver.cpp:60 > > -PassRefPtr<MutationObserver> MutationObserver::create(PassRefPtr<MutationCallback> callback) > > +PassRefPtr<MutationObserver> MutationObserver::create(PassRefPtr<MutationCallback> callback, ScriptExecutionContext* context) > > Don't we usually pass the ScriptExecutionContext as the first argument?
Yeah we've talked about this before. The code generator passes it as the last one (ex. V8MutationCallback::create), but humans pass it first like XMLHttpRequest. We should fix the code generator so code isn't weird like in V8MutationObserverCustom having two create() calls with a different order. I'll change this to match XMLHttpRequest.
Elliott Sprehn
Comment 8
2012-11-15 10:34:47 PST
Created
attachment 174483
[details]
Patch for landing
Adam Barth
Comment 9
2012-11-15 10:49:18 PST
Comment on
attachment 174483
[details]
Patch for landing Silly code generator. Trix are for kids.
WebKit Review Bot
Comment 10
2012-11-15 12:35:03 PST
Comment on
attachment 174483
[details]
Patch for landing Rejecting
attachment 174483
[details]
from commit-queue. Failed to run "['/mnt/git/webkit-commit-queue/Tools/Scripts/webkit-patch', '--status-host=queues.webkit.org', '-..." exit_code: 2 Last 500 characters of output: commit-queue/Source/WebKit/chromium/third_party/v8-i18n --revision 157 --non-interactive --force --accept theirs-conflict --ignore-externals' in '/mnt/git/webkit-commit-queue/Source/WebKit/chromium' 50>At revision 157. ________ running '/usr/bin/python tools/clang/scripts/update.py --mac-only' in '/mnt/git/webkit-commit-queue/Source/WebKit/chromium' ________ running '/usr/bin/python gyp_webkit' in '/mnt/git/webkit-commit-queue/Source/WebKit/chromium' Updating webkit projects from gyp files... Full output:
http://queues.webkit.org/results/14843700
WebKit Review Bot
Comment 11
2012-11-15 13:48:37 PST
Comment on
attachment 174483
[details]
Patch for landing Clearing flags on attachment: 174483 Committed
r134830
: <
http://trac.webkit.org/changeset/134830
>
WebKit Review Bot
Comment 12
2012-11-15 13:48:41 PST
All reviewed patches have been landed. Closing bug.
WebKit Review Bot
Comment 13
2012-11-19 11:59:36 PST
Re-opened since this is blocked by
bug 102701
Adam Klein
Comment 14
2012-11-19 12:03:52 PST
In offline discussion, abarth suggested an alternate approach using opaque roots: put each MutationObserver wrapper in the same object group(s) as the Nodes it's observing.
Adam Barth
Comment 15
2012-11-19 13:02:25 PST
In particular, we can't use ActiveDOMObject because MutationObservers need to work with Frameless documents, like those created by XMLHttpRequest.
Adam Klein
Comment 16
2012-11-19 16:56:37 PST
I tried to do this with implicit references and ran into flakiness. Opaque roots seem to work great, patch coming...
Adam Klein
Comment 17
2012-11-19 16:59:51 PST
Created
attachment 175083
[details]
Patch
Elliott Sprehn
Comment 18
2012-11-19 17:03:32 PST
Comment on
attachment 175083
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=175083&action=review
Nice!
> Source/WebCore/dom/MutationObserverRegistration.cpp:130 > + if (m_transientRegistrationNodes) {
Early return is usually nicer than indenting everything.
Adam Barth
Comment 19
2012-11-19 17:08:34 PST
Comment on
attachment 175083
[details]
Patch This looks good. Do we need to skip these tests for JSC while we work on a fix for the JSC bindings?
Adam Klein
Comment 20
2012-11-19 17:19:25 PST
Created
attachment 175088
[details]
Patch for landing
Adam Klein
Comment 21
2012-11-19 17:19:47 PST
(In reply to
comment #19
)
> (From update of
attachment 175083
[details]
) > This looks good. Do we need to skip these tests for JSC while we work on a fix for the JSC bindings?
Skipped in all non-chromium ports with a pointer to
bug 102744
.
WebKit Review Bot
Comment 22
2012-11-19 18:17:12 PST
Comment on
attachment 175088
[details]
Patch for landing Clearing flags on attachment: 175088 Committed
r135228
: <
http://trac.webkit.org/changeset/135228
>
WebKit Review Bot
Comment 23
2012-11-19 18:17:17 PST
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