Revert of Release streamed script resources after it was compiled (patchset #1 id:1 of https://codereview.chromium.org/2297523002/ )

Reason for revert:
Seems to break webkit unit tests:
https://build.chromium.org/p/client.v8.fyi/builders/V8-Blink%20Linux%2064/builds/9360
https://build.chromium.org/p/client.v8.fyi/builders/V8-Blink%20Linux%2064%20%28dbg%29/builds/5503

Original issue's description:
> Release streamed script resources after it was compiled
>
> Otherwise, we'd hold on to the resources until the embedder frees them
> which might take a long time
>
> R=marja@chromium.org,verwaest@chromium.org
> BUG=
>
> Committed: https://crrev.com/877dac34465c018bb534b7781fbe242ae4e33c32
> Cr-Commit-Position: refs/heads/master@{#38999}

TBR=marja@chromium.org,verwaest@chromium.org,jochen@chromium.org
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=

Review-Url: https://codereview.chromium.org/2290173003
Cr-Commit-Position: refs/heads/master@{#39012}
This commit is contained in:
machenbach 2016-08-30 05:37:53 -07:00 committed by Commit bot
parent c3e1b5f87c
commit 08d1aa6364
2 changed files with 2 additions and 11 deletions

View File

@ -2194,11 +2194,10 @@ MaybeLocal<Script> ScriptCompiler::Compile(Local<Context> context,
}
has_pending_exception = result.is_null();
if (has_pending_exception) isolate->ReportPendingMessages();
source->Release();
RETURN_ON_FAILED_EXECUTION(Script);
source->info->clear_script(); // because script goes out of scope.
Local<UnboundScript> generic = ToApiHandle<UnboundScript>(result);
if (generic.IsEmpty()) return Local<Script>();
Local<Script> bound = generic->BindToCurrentContext();

View File

@ -26,14 +26,6 @@ struct StreamedSource {
ScriptCompiler::StreamedSource::Encoding encoding)
: source_stream(source_stream), encoding(encoding) {}
void Release() {
parser.reset();
info.reset();
zone.reset();
cached_data.reset();
source_stream.reset();
}
// Internal implementation of v8::ScriptCompiler::StreamedSource.
std::unique_ptr<ScriptCompiler::ExternalSourceStream> source_stream;
ScriptCompiler::StreamedSource::Encoding encoding;