RESOLVED FIXED154982
JSArrayBuffers should be collected less aggressively
https://bugs.webkit.org/show_bug.cgi?id=154982
Summary JSArrayBuffers should be collected less aggressively
Keith Miller
Reported 2016-03-03 14:20:54 PST
JSArrayBuffers should be collected less aggressively
Attachments
Patch (19.06 KB, patch)
2016-03-03 14:34 PST, Keith Miller
no flags
Patch (19.72 KB, patch)
2016-03-03 16:33 PST, Keith Miller
no flags
Keith Miller
Comment 1 2016-03-03 14:34:37 PST
Geoffrey Garen
Comment 2 2016-03-03 15:48:20 PST
Comment on attachment 272777 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=272777&action=review > Source/JavaScriptCore/runtime/JSArrayBuffer.h:43 > + enum class WrapperMode { > + Wrap, > + DontWrap > + }; Let's not do these modes just to avoid one virtual function call -- unless you have some benchmark data that says we need to. We're already on the slow path, so the goal is to be reliable, understandable, and correct. > Source/JavaScriptCore/runtime/JSGenericTypedArrayViewInlines.h:-439 > - RELEASE_ASSERT(thisObject->existingBufferInButterfly()); Why isn't this ASSERT valid? This is the kind of thing you should explain in the ChangeLog. > Source/JavaScriptCore/runtime/SimpleTypedArrayController.h:52 > + virtual void registerWrapper(JSGlobalObject*, ArrayBuffer*, JSArrayBuffer*) override; Please update the comment above about "and it didn't die" -- that's not really how this works anymore. > Source/WebCore/bindings/js/JSDOMBinding.h:-412 > - buffer->ref(); You should explain in the ChangeLog that this ref() was balanced by a deref() in finalize(), but both were unnecessary because... What is the other mechanism that manages this lifetime?
Keith Miller
Comment 3 2016-03-03 16:33:17 PST
Geoffrey Garen
Comment 4 2016-03-03 16:46:37 PST
Comment on attachment 272795 [details] Patch r=me
WebKit Commit Bot
Comment 5 2016-03-03 19:19:03 PST
Comment on attachment 272795 [details] Patch Clearing flags on attachment: 272795 Committed r197543: <http://trac.webkit.org/changeset/197543>
WebKit Commit Bot
Comment 6 2016-03-03 19:19:06 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.