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

Side by Side Diff: src/background-parsing-task.cc

Issue 366153002: Add script streaming API (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: added tests + fixed compilation flags (!) Created 6 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
(Empty)
1 // Copyright 2014 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #include "src/background-parsing-task.h"
6
7 #include "src/parser.h"
8
9 namespace v8 {
10 namespace internal {
11
12 static const int kBackgroundParserThreadStackSize = 64 * KB;
13
14 void BackgroundParsingTask::Run() {
15 uintptr_t limit =
16 reinterpret_cast<uintptr_t>(&limit) - kBackgroundParserThreadStackSize;
17 Parser parser(source_->info, limit, hash_seed_);
18 parser.set_allow_lazy(allow_lazy_);
19 parser.ParseOnBackground();
20
21 if (script_data_ != NULL) {
22 source_->cached_data = new ScriptCompiler::CachedData(
23 script_data_->data(), script_data_->length(),
24 ScriptCompiler::CachedData::BufferOwned);
25 script_data_->ReleaseDataOwnership();
26 delete script_data_;
27 script_data_ = NULL;
28 }
29 }
30 }
31 } // namespace v8::internal
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698