OLD | NEW |
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 142 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
153 { | 153 { |
154 InspectorInstrumentationCookie cookie = InspectorInstrumentation::willCallFu
nction(context, DevToolsFunctionInfo(function)); | 154 InspectorInstrumentationCookie cookie = InspectorInstrumentation::willCallFu
nction(context, DevToolsFunctionInfo(function)); |
155 v8::MaybeLocal<v8::Value> result = V8ScriptRunner::callFunction(function, co
ntext, receiver, argc, info, isolate); | 155 v8::MaybeLocal<v8::Value> result = V8ScriptRunner::callFunction(function, co
ntext, receiver, argc, info, isolate); |
156 InspectorInstrumentation::didCallFunction(cookie); | 156 InspectorInstrumentation::didCallFunction(cookie); |
157 return result; | 157 return result; |
158 } | 158 } |
159 | 159 |
160 v8::Local<v8::Value> ScriptController::executeScriptAndReturnValue(v8::Local<v8:
:Context> context, const ScriptSourceCode& source, AccessControlStatus accessCon
trolStatus, double* compilationFinishTime) | 160 v8::Local<v8::Value> ScriptController::executeScriptAndReturnValue(v8::Local<v8:
:Context> context, const ScriptSourceCode& source, AccessControlStatus accessCon
trolStatus, double* compilationFinishTime) |
161 { | 161 { |
162 TRACE_EVENT1("devtools.timeline", "EvaluateScript", "data", InspectorEvaluat
eScriptEvent::data(frame(), source.url().string(), source.startLine())); | 162 TRACE_EVENT1("devtools.timeline", "EvaluateScript", "data", InspectorEvaluat
eScriptEvent::data(frame(), source.url().string(), source.startLine())); |
163 InspectorInstrumentationCookie cookie = InspectorInstrumentation::willEvalua
teScript(frame(), source.url().string(), source.startLine()); | 163 InspectorInstrumentationCookie cookie = InspectorInstrumentation::willEvalua
teScript(frame()); |
164 | 164 |
165 v8::Local<v8::Value> result; | 165 v8::Local<v8::Value> result; |
166 { | 166 { |
167 V8CacheOptions v8CacheOptions(V8CacheOptionsDefault); | 167 V8CacheOptions v8CacheOptions(V8CacheOptionsDefault); |
168 if (frame()->settings()) | 168 if (frame()->settings()) |
169 v8CacheOptions = frame()->settings()->v8CacheOptions(); | 169 v8CacheOptions = frame()->settings()->v8CacheOptions(); |
170 | 170 |
171 // Isolate exceptions that occur when compiling and executing | 171 // Isolate exceptions that occur when compiling and executing |
172 // the code. These exceptions should not interfere with | 172 // the code. These exceptions should not interfere with |
173 // javascript code we might evaluate from C++ when returning | 173 // javascript code we might evaluate from C++ when returning |
(...skipping 417 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
591 for (size_t i = 0; i < resultArray->Length(); ++i) { | 591 for (size_t i = 0; i < resultArray->Length(); ++i) { |
592 v8::Local<v8::Value> value; | 592 v8::Local<v8::Value> value; |
593 if (!resultArray->Get(scriptState->context(), i).ToLocal(&value)) | 593 if (!resultArray->Get(scriptState->context(), i).ToLocal(&value)) |
594 return; | 594 return; |
595 results->append(value); | 595 results->append(value); |
596 } | 596 } |
597 } | 597 } |
598 } | 598 } |
599 | 599 |
600 } // namespace blink | 600 } // namespace blink |
OLD | NEW |