Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1661)

Issue 56973002: Fix memory leak on serializing neutered ArrayBuffer. (Closed)

Created:
7 years, 1 month ago by sof
Modified:
7 years, 1 month ago
CC:
blink-reviews, Nils Barth (inactive), kojih, arv+blink, jsbell+bindings_chromium.org, abarth-chromium, marja+watch_chromium.org, adamk+blink_chromium.org, haraken, Nate Chapin, Inactive
Base URL:
https://chromium.googlesource.com/chromium/blink.git@master
Visibility:
Public.

Description

Fix memory leak on serializing neutered ArrayBuffer. If the serialization of an ArrayBufferView's ArrayBuffer fails, unwind the state stack completely before reporting an error to avoid leaking a serializer state object. To accommodate, split out the state stack overflow checking from the dispatching on value types which was both performed by the main serialization method. Now handled by Serializer::doSerialize() Serializer::doSerializeImpl() respectively, with the former calling upon the latter if the stack check passes. R=dslomov@chromium.org BUG=291240 Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=161343

Patch Set 1 #

Total comments: 4

Patch Set 2 : Restructure serialization method for simpler unwinding #

Total comments: 1

Patch Set 3 : Restore/improve comment #

Unified diffs Side-by-side diffs Delta from patch set Stats (+28 lines, -13 lines) Patch
M Source/bindings/v8/SerializedScriptValue.cpp View 1 2 4 chunks +28 lines, -13 lines 0 comments Download

Messages

Total messages: 10 (0 generated)
sof
Please have a look.
7 years, 1 month ago (2013-11-02 16:36:21 UTC) #1
Dmitry Lomov (no reviews)
https://codereview.chromium.org/56973002/diff/1/Source/bindings/v8/SerializedScriptValue.cpp File Source/bindings/v8/SerializedScriptValue.cpp (right): https://codereview.chromium.org/56973002/diff/1/Source/bindings/v8/SerializedScriptValue.cpp#newcode1142 Source/bindings/v8/SerializedScriptValue.cpp:1142: if (StateBase* stateOut = doSerialize(underlyingBuffer, 0)) { style nit: ...
7 years, 1 month ago (2013-11-04 10:15:34 UTC) #2
sof
https://codereview.chromium.org/56973002/diff/1/Source/bindings/v8/SerializedScriptValue.cpp File Source/bindings/v8/SerializedScriptValue.cpp (right): https://codereview.chromium.org/56973002/diff/1/Source/bindings/v8/SerializedScriptValue.cpp#newcode1142 Source/bindings/v8/SerializedScriptValue.cpp:1142: if (StateBase* stateOut = doSerialize(underlyingBuffer, 0)) { On 2013/11/04 ...
7 years, 1 month ago (2013-11-04 10:21:14 UTC) #3
Dmitry Lomov (no reviews)
On 2013/11/04 10:21:14, sof wrote: > https://codereview.chromium.org/56973002/diff/1/Source/bindings/v8/SerializedScriptValue.cpp > File Source/bindings/v8/SerializedScriptValue.cpp (right): > > https://codereview.chromium.org/56973002/diff/1/Source/bindings/v8/SerializedScriptValue.cpp#newcode1142 > ...
7 years, 1 month ago (2013-11-04 11:05:47 UTC) #4
sof
On 2013/11/04 11:05:47, Dmitry Lomov (chromium) wrote: > On 2013/11/04 10:21:14, sof wrote: > > ...
7 years, 1 month ago (2013-11-04 17:10:45 UTC) #5
Dmitry Lomov (no reviews)
LGTM with a comment on comment https://codereview.chromium.org/56973002/diff/90001/Source/bindings/v8/SerializedScriptValue.cpp File Source/bindings/v8/SerializedScriptValue.cpp (right): https://codereview.chromium.org/56973002/diff/90001/Source/bindings/v8/SerializedScriptValue.cpp#newcode1156 Source/bindings/v8/SerializedScriptValue.cpp:1156: // (but might ...
7 years, 1 month ago (2013-11-05 10:56:09 UTC) #6
sof
On 2013/11/05 10:56:09, Dmitry Lomov (chromium) wrote: > LGTM with a comment on comment > ...
7 years, 1 month ago (2013-11-05 14:13:44 UTC) #7
jochen (gone - plz use gerrit)
rubberstamp lgtm
7 years, 1 month ago (2013-11-05 14:41:00 UTC) #8
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/sigbjornf@opera.com/56973002/140001
7 years, 1 month ago (2013-11-05 14:49:30 UTC) #9
commit-bot: I haz the power
7 years, 1 month ago (2013-11-05 15:42:41 UTC) #10
Message was sent while issue was closed.
Change committed as 161343

Powered by Google App Engine
This is Rietveld 408576698