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

Unified Diff: third_party/WebKit/Source/bindings/core/v8/V8ScriptRunner.cpp

Issue 2049003002: Wrap GCed raw pointer parameters of WTF::bind with Persistent (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 4 years, 6 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/dom/ExecutionContext.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 aa697cd836c3b16ed32e40be4bc9896428ce6a22..45dd05006c3505cdf8f2cc80254c1e2903cfa579 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, wrapPersistent(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, wrapPersistent(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, wrapPersistent(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(postStreamCompile, cacheOptions, resource->cacheHandler(), streamer);
+ return WTF::bind(postStreamCompile, cacheOptions, wrapPersistent(resource->cacheHandler()), wrapPersistent(streamer));
}
} // namespace
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/dom/ExecutionContext.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698