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

Side by Side Diff: third_party/WebKit/Source/bindings/core/v8/ScriptController.cpp

Issue 2962353002: Add probe for V8.Complie (Closed)
Patch Set: fix tests Created 3 years, 5 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
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2008, 2009 Google Inc. All rights reserved. 2 * Copyright (C) 2008, 2009 Google Inc. All rights reserved.
3 * Copyright (C) 2009 Apple Inc. All rights reserved. 3 * Copyright (C) 2009 Apple Inc. All rights reserved.
4 * Copyright (C) 2014 Opera Software ASA. All rights reserved. 4 * Copyright (C) 2014 Opera Software ASA. All rights reserved.
5 * 5 *
6 * Redistribution and use in source and binary forms, with or without 6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions are 7 * modification, are permitted provided that the following conditions are
8 * met: 8 * met:
9 * 9 *
10 * * Redistributions of source code must retain the above copyright 10 * * Redistributions of source code must retain the above copyright
(...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after
120 CacheOptions(source.GetResource(), GetFrame()->GetSettings()); 120 CacheOptions(source.GetResource(), GetFrame()->GetSettings());
121 121
122 // Isolate exceptions that occur when compiling and executing 122 // Isolate exceptions that occur when compiling and executing
123 // the code. These exceptions should not interfere with 123 // the code. These exceptions should not interfere with
124 // javascript code we might evaluate from C++ when returning 124 // javascript code we might evaluate from C++ when returning
125 // from here. 125 // from here.
126 v8::TryCatch try_catch(GetIsolate()); 126 v8::TryCatch try_catch(GetIsolate());
127 try_catch.SetVerbose(true); 127 try_catch.SetVerbose(true);
128 128
129 v8::Local<v8::Script> script; 129 v8::Local<v8::Script> script;
130 if (!V8ScriptRunner::CompileScript(source, GetIsolate(), 130 if (!V8ScriptRunner::CompileScript(ScriptState::From(context), source,
131 access_control_status, v8_cache_options) 131 access_control_status, v8_cache_options)
132 .ToLocal(&script)) 132 .ToLocal(&script))
133 return result; 133 return result;
134 134
135 if (!V8ScriptRunner::RunCompiledScript(GetIsolate(), script, 135 if (!V8ScriptRunner::RunCompiledScript(GetIsolate(), script,
136 GetFrame()->GetDocument()) 136 GetFrame()->GetDocument())
137 .ToLocal(&result)) 137 .ToLocal(&result))
138 return result; 138 return result;
139 } 139 }
140 140
(...skipping 228 matching lines...) Expand 10 before | Expand all | Expand 10 after
369 if (!world_name.IsEmpty()) { 369 if (!world_name.IsEmpty()) {
370 DOMWrapperWorld::SetNonMainWorldHumanReadableName(world->GetWorldId(), 370 DOMWrapperWorld::SetNonMainWorldHumanReadableName(world->GetWorldId(),
371 world_name); 371 world_name);
372 } 372 }
373 // Make sure the execution context exists. 373 // Make sure the execution context exists.
374 WindowProxy(*world); 374 WindowProxy(*world);
375 return world; 375 return world;
376 } 376 }
377 377
378 } // namespace blink 378 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698