Chromium Code Reviews| 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 2eee4629034ffe67c7656d0092d67e5dde55812e..cf961a5f032ef6913fcecf6a26c64afdfe0b983f 100644 |
| --- a/third_party/WebKit/Source/bindings/core/v8/V8ScriptRunner.cpp |
| +++ b/third_party/WebKit/Source/bindings/core/v8/V8ScriptRunner.cpp |
| @@ -395,7 +395,8 @@ v8::MaybeLocal<v8::Value> V8ScriptRunner::runCompiledScript(v8::Isolate* isolate |
| { |
| ASSERT(!script.IsEmpty()); |
| TRACE_EVENT_SCOPED_SAMPLING_STATE("v8", "V8Execution"); |
| - TRACE_EVENT1("v8", "v8.run", "fileName", TRACE_STR_COPY(*v8::String::Utf8Value(script->GetUnboundScript()->GetScriptName()))); |
| + bool isCrossOrigin = context->isDocument() && toDocument(context)->frame()->isCrossOrigin(); |
| + TRACE_EVENT2("v8", "v8.run", "fileName", TRACE_STR_COPY(*v8::String::Utf8Value(script->GetUnboundScript()->GetScriptName())), "origin", (isCrossOrigin ? "cross-origin" : "same-origin")); |
| if (v8::MicrotasksScope::GetCurrentDepth(isolate) >= kMaxRecursionDepth) |
| return throwStackOverflowExceptionIfNeeded(isolate); |
| @@ -486,7 +487,8 @@ v8::MaybeLocal<v8::Value> V8ScriptRunner::callAsConstructor(v8::Isolate* isolate |
| v8::MaybeLocal<v8::Value> V8ScriptRunner::callFunction(v8::Local<v8::Function> function, ExecutionContext* context, v8::Local<v8::Value> receiver, int argc, v8::Local<v8::Value> args[], v8::Isolate* isolate) |
| { |
| ScopedFrameBlamer frameBlamer(context->isDocument() ? toDocument(context)->frame() : nullptr); |
| - TRACE_EVENT0("v8", "v8.callFunction"); |
| + bool isCrossOrigin = context->isDocument() && toDocument(context)->frame()->isCrossOrigin(); |
|
Sami
2016/06/14 22:36:10
Doesn't frameblamer already give us this? The scop
|
| + TRACE_EVENT1("v8", "v8.callFunction", "origin", (isCrossOrigin ? "cross-origin" : "same-origin")); |
| TRACE_EVENT_SCOPED_SAMPLING_STATE("v8", "V8Execution"); |
| int depth = v8::MicrotasksScope::GetCurrentDepth(isolate); |