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

Issue 974943003: Fix Initialize & Dispose for external snapshot. (Closed)

Created:
5 years, 9 months ago by vogelheim
Modified:
5 years, 9 months ago
CC:
v8-dev
Base URL:
https://chromium.googlesource.com/v8/v8.git@master
Target Ref:
refs/pending/heads/master
Project:
v8
Visibility:
Public.

Description

Fix Initialize & Dispose for external snapshot. Make sure v8::V8::(Initialize|Dispose) can be called in any order. This is a follow-on to crrev.com/960883003, which fixed a memory leak in this code, but uncovered another, more subtle bug: Previously, the code expected you would v8::V8::Initialize once, and v8::V8::Dispose once. The first bug was that in this case the holder_ variable would point to deallocated memory. The second bug was that once the snapshot was disposed, there was no way to get it back on a future Initialize. These are uncovered by the InitializeAndDisposeMultiple test case. The fix is to keep memory to the raw snapshot and to then cleanly build & destroy the tables in Initialize & Dispose. Since sometimes setNativesBlob is called just after Initialize, that situation must be handled, too. BUG= Committed: https://crrev.com/2525e8f4026307cf7116e64bc0e9a1bb512cbfff Cr-Commit-Position: refs/heads/master@{#26978}

Patch Set 1 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+29 lines, -6 lines) Patch
M src/api.cc View 1 chunk +3 lines, -0 lines 0 comments Download
M src/natives.h View 1 chunk +1 line, -0 lines 0 comments Download
M src/natives-external.cc View 2 chunks +24 lines, -6 lines 0 comments Download
M src/snapshot-empty.cc View 1 chunk +1 line, -0 lines 0 comments Download

Messages

Total messages: 7 (2 generated)
vogelheim
5 years, 9 months ago (2015-03-03 17:42:19 UTC) #2
jochen (gone - plz use gerrit)
lgtm
5 years, 9 months ago (2015-03-03 18:30:53 UTC) #3
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/974943003/1
5 years, 9 months ago (2015-03-04 10:36:47 UTC) #5
commit-bot: I haz the power
Committed patchset #1 (id:1)
5 years, 9 months ago (2015-03-04 10:37:52 UTC) #6
commit-bot: I haz the power
5 years, 9 months ago (2015-03-04 10:38:15 UTC) #7
Message was sent while issue was closed.
Patchset 1 (id:??) landed as
https://crrev.com/2525e8f4026307cf7116e64bc0e9a1bb512cbfff
Cr-Commit-Position: refs/heads/master@{#26978}

Powered by Google App Engine
This is Rietveld 408576698