| Index: third_party/WebKit/Source/bindings/core/v8/V8ScriptRunner.cpp
|
| diff --git a/third_party/WebKit/Source/bindings/core/v8/V8ScriptRunner.cpp b/third_party/WebKit/Source/bindings/core/v8/V8ScriptRunner.cpp
|
| index aee1b2468d847f2fb295605a27b4432da4ae0de6..0c0a7bb0a32d958de22438e70475ce4767223be8 100644
|
| --- a/third_party/WebKit/Source/bindings/core/v8/V8ScriptRunner.cpp
|
| +++ b/third_party/WebKit/Source/bindings/core/v8/V8ScriptRunner.cpp
|
| @@ -296,7 +296,7 @@ std::unique_ptr<CompileFn> selectCompileFunction(V8CacheOptions cacheOptions, Ca
|
| switch (cacheOptions) {
|
| case V8CacheOptionsParse:
|
| // Use parser-cache; in-memory only.
|
| - return bind(compileAndConsumeOrProduce, cacheHandler, cacheTag(CacheTagParser, cacheHandler), v8::ScriptCompiler::kConsumeParserCache, v8::ScriptCompiler::kProduceParserCache, CachedMetadataHandler::CacheLocally);
|
| + return bind(compileAndConsumeOrProduce, wrapCrossThreadPersistent(cacheHandler), cacheTag(CacheTagParser, cacheHandler), v8::ScriptCompiler::kConsumeParserCache, v8::ScriptCompiler::kProduceParserCache, CachedMetadataHandler::CacheLocally);
|
| break;
|
|
|
| case V8CacheOptionsDefault:
|
| @@ -307,12 +307,12 @@ std::unique_ptr<CompileFn> selectCompileFunction(V8CacheOptions cacheOptions, Ca
|
| unsigned codeCacheTag = cacheTag(CacheTagCode, cacheHandler);
|
| CachedMetadata* codeCache = cacheHandler->cachedMetadata(codeCacheTag);
|
| if (codeCache)
|
| - return bind(compileAndConsumeCache, cacheHandler, codeCacheTag, v8::ScriptCompiler::kConsumeCodeCache);
|
| + return bind(compileAndConsumeCache, wrapCrossThreadPersistent(cacheHandler), codeCacheTag, v8::ScriptCompiler::kConsumeCodeCache);
|
| if (cacheOptions != V8CacheOptionsAlways && !isResourceHotForCaching(cacheHandler, hotHours)) {
|
| V8ScriptRunner::setCacheTimeStamp(cacheHandler);
|
| return bind(compileWithoutOptions, V8CompileHistogram::Cacheable);
|
| }
|
| - return bind(compileAndProduceCache, cacheHandler, codeCacheTag, v8::ScriptCompiler::kProduceCodeCache, CachedMetadataHandler::SendToPlatform);
|
| + return bind(compileAndProduceCache, wrapCrossThreadPersistent(cacheHandler), codeCacheTag, v8::ScriptCompiler::kProduceCodeCache, CachedMetadataHandler::SendToPlatform);
|
| break;
|
| }
|
|
|
| @@ -338,7 +338,7 @@ std::unique_ptr<CompileFn> selectCompileFunction(V8CacheOptions cacheOptions, Sc
|
| ASSERT(!resource->errorOccurred());
|
| ASSERT(streamer->isFinished());
|
| ASSERT(!streamer->streamingSuppressed());
|
| - return WTF::bind<v8::Isolate*, v8::Local<v8::String>, v8::ScriptOrigin>(postStreamCompile, cacheOptions, resource->cacheHandler(), streamer);
|
| + return WTF::bind<v8::Isolate*, v8::Local<v8::String>, v8::ScriptOrigin>(postStreamCompile, cacheOptions, wrapCrossThreadPersistent(resource->cacheHandler()), wrapCrossThreadPersistent(streamer));
|
| }
|
| } // namespace
|
|
|
|
|