Failed to apply patch for
third_party/WebKit/Source/bindings/core/v8/V8ScriptRunner.cpp:
While running git apply --index -3 -p1;
error: patch failed:
third_party/WebKit/Source/bindings/core/v8/V8ScriptRunner.cpp:137
Falling back to three-way merge...
Applied patch to
'third_party/WebKit/Source/bindings/core/v8/V8ScriptRunner.cpp' with conflicts.
U third_party/WebKit/Source/bindings/core/v8/V8ScriptRunner.cpp
Patch: third_party/WebKit/Source/bindings/core/v8/V8ScriptRunner.cpp
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
f7258b0a58a5c024c2a58b189e65bfc0ef3c2686..0d76057d3df2b88a28fc45c4c9e08432e68aa35a
100644
--- a/third_party/WebKit/Source/bindings/core/v8/V8ScriptRunner.cpp
+++ b/third_party/WebKit/Source/bindings/core/v8/V8ScriptRunner.cpp
@@ -137,7 +137,7 @@ v8::MaybeLocal<v8::Script>
compileWithoutOptions(V8CompileHistogram::Cacheabilit
}
// Compile a script, and consume a V8 cache that was generated previously.
-v8::MaybeLocal<v8::Script> compileAndConsumeCache(CachedMetadataHandler*
cacheHandler, unsigned tag, v8::ScriptCompiler::CompileOptions compileOptions,
v8::Isolate* isolate, v8::Local<v8::String> code, v8::ScriptOrigin origin)
+v8::MaybeLocal<v8::Script> compileAndConsumeCache(CachedMetadataHandler*
cacheHandler, uint32_t tag, v8::ScriptCompiler::CompileOptions compileOptions,
v8::Isolate* isolate, v8::Local<v8::String> code, v8::ScriptOrigin origin)
{
V8CompileHistogram histogramScope(V8CompileHistogram::Cacheable);
CachedMetadata* cachedMetadata = cacheHandler->cachedMetadata(tag);
@@ -153,7 +153,7 @@ v8::MaybeLocal<v8::Script>
compileAndConsumeCache(CachedMetadataHandler* cacheHa
}
// Compile a script, and produce a V8 cache for future use.
-v8::MaybeLocal<v8::Script> compileAndProduceCache(CachedMetadataHandler*
cacheHandler, unsigned tag, v8::ScriptCompiler::CompileOptions compileOptions,
CachedMetadataHandler::CacheType cacheType, v8::Isolate* isolate,
v8::Local<v8::String> code, v8::ScriptOrigin origin)
+v8::MaybeLocal<v8::Script> compileAndProduceCache(CachedMetadataHandler*
cacheHandler, uint32_t tag, v8::ScriptCompiler::CompileOptions compileOptions,
CachedMetadataHandler::CacheType cacheType, v8::Isolate* isolate,
v8::Local<v8::String> code, v8::ScriptOrigin origin)
{
V8CompileHistogram histogramScope(V8CompileHistogram::Cacheable);
v8::ScriptCompiler::Source source(code, origin);
@@ -176,7 +176,7 @@ v8::MaybeLocal<v8::Script>
compileAndProduceCache(CachedMetadataHandler* cacheHa
// Compile a script, and consume or produce a V8 Cache, depending on whether
the
// given resource already has cached data available.
-v8::MaybeLocal<v8::Script> compileAndConsumeOrProduce(CachedMetadataHandler*
cacheHandler, unsigned tag, v8::ScriptCompiler::CompileOptions consumeOptions,
v8::ScriptCompiler::CompileOptions produceOptions,
CachedMetadataHandler::CacheType cacheType, v8::Isolate* isolate,
v8::Local<v8::String> code, v8::ScriptOrigin origin)
+v8::MaybeLocal<v8::Script> compileAndConsumeOrProduce(CachedMetadataHandler*
cacheHandler, uint32_t tag, v8::ScriptCompiler::CompileOptions consumeOptions,
v8::ScriptCompiler::CompileOptions produceOptions,
CachedMetadataHandler::CacheType cacheType, v8::Isolate* isolate,
v8::Local<v8::String> code, v8::ScriptOrigin origin)
{
return cacheHandler->cachedMetadata(tag)
? compileAndConsumeCache(cacheHandler, tag, consumeOptions, isolate,
code, origin)
@@ -192,11 +192,11 @@ enum CacheTagKind {
static const int kCacheTagKindSize = 2;
-unsigned cacheTag(CacheTagKind kind, CachedMetadataHandler* cacheHandler)
+uint32_t cacheTag(CacheTagKind kind, CachedMetadataHandler* cacheHandler)
{
static_assert((1 << kCacheTagKindSize) >= CacheTagLast, "CacheTagLast must
be large enough");
- static unsigned v8CacheDataVersion =
v8::ScriptCompiler::CachedDataVersionTag() << kCacheTagKindSize;
+ static uint32_t v8CacheDataVersion =
v8::ScriptCompiler::CachedDataVersionTag() << kCacheTagKindSize;
// A script can be (successfully) interpreted with different encodings,
// depending on the page it appears in. The cache doesn't know anything
@@ -210,7 +210,7 @@ unsigned cacheTag(CacheTagKind kind, CachedMetadataHandler*
cacheHandler)
bool isResourceHotForCaching(CachedMetadataHandler* cacheHandler, int hotHours)
{
const double cacheWithinSeconds = hotHours * 60 * 60;
- unsigned tag = cacheTag(CacheTagTimeStamp, cacheHandler);
+ uint32_t tag = cacheTag(CacheTagTimeStamp, cacheHandler);
CachedMetadata* cachedMetadata = cacheHandler->cachedMetadata(tag);
if (!cachedMetadata)
return false;
@@ -304,7 +304,7 @@ std::unique_ptr<CompileFn>
selectCompileFunction(V8CacheOptions cacheOptions, Ca
case V8CacheOptionsAlways: {
// Use code caching for recently seen resources.
// Use compression depending on the cache option.
- unsigned codeCacheTag = cacheTag(CacheTagCode, cacheHandler);
+ uint32_t codeCacheTag = cacheTag(CacheTagCode, cacheHandler);
CachedMetadata* codeCache = cacheHandler->cachedMetadata(codeCacheTag);
if (codeCache)
return bind(compileAndConsumeCache, wrapPersistent(cacheHandler),
codeCacheTag, v8::ScriptCompiler::kConsumeCodeCache);
@@ -563,12 +563,12 @@ v8::MaybeLocal<v8::Object>
V8ScriptRunner::instantiateObjectInDocument(v8::Isola
return result;
}
-unsigned V8ScriptRunner::tagForParserCache(CachedMetadataHandler* cacheHandler)
+uint32_t V8ScriptRunner::tagForParserCache(CachedMetadataHandler* cacheHandler)
{
return cacheTag(CacheTagParser, cacheHandler);
}
-unsigned V8ScriptRunner::tagForCodeCache(CachedMetadataHandler* cacheHandler)
+uint32_t V8ScriptRunner::tagForCodeCache(CachedMetadataHandler* cacheHandler)
{
return cacheTag(CacheTagCode, cacheHandler);
}
@@ -577,7 +577,7 @@ unsigned
V8ScriptRunner::tagForCodeCache(CachedMetadataHandler* cacheHandler)
void V8ScriptRunner::setCacheTimeStamp(CachedMetadataHandler* cacheHandler)
{
double now = WTF::currentTime();
- unsigned tag = cacheTag(CacheTagTimeStamp, cacheHandler);
+ uint32_t tag = cacheTag(CacheTagTimeStamp, cacheHandler);
cacheHandler->clearCachedMetadata(CachedMetadataHandler::CacheLocally);
cacheHandler->setCachedMetadata(tag, reinterpret_cast<char*>(&now),
sizeof(now), CachedMetadataHandler::SendToPlatform);
}
https://codereview.chromium.org/2258743002/