Summary: | Sink the Vector<uint8_t> buffer into the SerializedScriptValue constructor | ||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Zan Dobersek <zan> | ||||||||||||
Component: | New Bugs | Assignee: | Zan Dobersek <zan> | ||||||||||||
Status: | RESOLVED FIXED | ||||||||||||||
Severity: | Normal | CC: | alecflett, commit-queue, jsbell | ||||||||||||
Priority: | P2 | ||||||||||||||
Version: | 528+ (Nightly build) | ||||||||||||||
Hardware: | Unspecified | ||||||||||||||
OS: | Unspecified | ||||||||||||||
Attachments: |
|
Description
Zan Dobersek
2015-03-12 12:56:12 PDT
Created attachment 248537 [details]
Patch
Comment on attachment 248537 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=248537&action=review > Source/WebCore/bindings/js/IDBBindingUtilities.cpp:322 > +Deprecated::ScriptValue deserializeIDBValueBuffer(JSC::ExecState* exec, Vector<uint8_t>&& buffer, bool keyIsDefined) Need to update the declaration in the IDBBindingUtilities.h header file too. Or delete that declaration entirely and mark this static so it has internal linkage. Created attachment 248840 [details]
Patch
Created attachment 248865 [details]
Patch
Created attachment 268135 [details]
Patch
Comment on attachment 268135 [details]
Patch
Looks like a nice cleanup. This needs approved by an owner, though.
Comment on attachment 268135 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=268135&action=review > Source/WebKit2/UIProcess/UserContent/WebUserContentControllerProxy.cpp:182 > + RefPtr<WebCore::SerializedScriptValue> value = WebCore::SerializedScriptValue::adopt(dataReference.vector()); > > handler->client().didPostMessage(*page, *frame, securityOrigin, *value); I think this reads better without a local variable: handler->client().didPostMessage(*page, *frame, securityOrigin, *WebCore::SerializedScriptValue::adopt(dataReference.vector())); > Source/WebKit2/UIProcess/WebPageProxy.cpp:4701 > + RefPtr<API::SerializedScriptValue> returnValue = API::SerializedScriptValue::adopt(WTFMove(data)); > + callback->performCallbackWithReturnValue(returnValue.get(), hadException, details); i think this still reads better without a local variable: callback->performCallbackWithReturnValue(API::SerializedScriptValue::adopt(WTFMove(data)).get(), hadException, details); Created attachment 269231 [details] Patch for landing Addressed the recommendations in comment #7. Comment on attachment 269231 [details] Patch for landing Clearing flags on attachment: 269231 Committed r195235: <http://trac.webkit.org/changeset/195235> All reviewed patches have been landed. Closing bug. |