WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
147487
[Streams API] ReadableStreamReader closed promise should use CachedAttribute
https://bugs.webkit.org/show_bug.cgi?id=147487
Summary
[Streams API] ReadableStreamReader closed promise should use CachedAttribute
youenn fablet
Reported
2015-07-31 05:16:53 PDT
This would allow removing the current specific promise attribute binding. This would allow using a JSC::WriteBarrier in lieu of JSC::Strong as well.
Attachments
Patch
(2.75 KB, patch)
2015-07-31 05:20 PDT
,
youenn fablet
no flags
Details
Formatted Diff
Diff
View All
Add attachment
proposed patch, testcase, etc.
youenn fablet
Comment 1
2015-07-31 05:20:18 PDT
Created
attachment 257918
[details]
Patch
youenn fablet
Comment 2
2015-07-31 05:21:15 PDT
(In reply to
comment #1
)
> Created
attachment 257918
[details]
> Patch
This patch does not remove the specific binding generator code related to promise attribute. This would be done as a follow-up patch.
Darin Adler
Comment 3
2015-08-08 17:57:40 PDT
Comment on
attachment 257918
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=257918&action=review
Looks OK. I don’t really know what CachedAttribute does but this looks sensible.
> Source/WebCore/bindings/js/JSReadableStreamReaderCustom.cpp:51 > + const_cast<JSReadableStreamReader*>(this)->m_closed.set(exec->vm(), this, closedPromise->promise());
Is this preferred over marking m_closed mutable?
youenn fablet
Comment 4
2015-08-10 02:13:36 PDT
(In reply to
comment #3
)
> Comment on
attachment 257918
[details]
> Patch > > View in context: >
https://bugs.webkit.org/attachment.cgi?id=257918&action=review
> > Looks OK. I don’t really know what CachedAttribute does but this looks > sensible.
CachedAttribute generates some code like: - a class member field in the JS wrapper class (as would be done in JSC) - marking the member field when the JS wrapper object is being visited. In our case, this removes one JSC::Strong. This does not solve entirely the issue since the promise is strongified when being wrapped as a DeferredWrapper.
> > Source/WebCore/bindings/js/JSReadableStreamReaderCustom.cpp:51 > > + const_cast<JSReadableStreamReader*>(this)->m_closed.set(exec->vm(), this, closedPromise->promise()); > > Is this preferred over marking m_closed mutable?
Right, marking cached attributes as mutable would be an improvement.
WebKit Commit Bot
Comment 5
2015-08-10 03:01:49 PDT
Comment on
attachment 257918
[details]
Patch Clearing flags on attachment: 257918 Committed
r188209
: <
http://trac.webkit.org/changeset/188209
>
WebKit Commit Bot
Comment 6
2015-08-10 03:01:53 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