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 137 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
148 | 148 |
149 v8::Local<v8::Value> ScriptController::callFunction(v8::Handle<v8::Function> fun
ction, v8::Handle<v8::Value> receiver, int argc, v8::Handle<v8::Value> info[]) | 149 v8::Local<v8::Value> ScriptController::callFunction(v8::Handle<v8::Function> fun
ction, v8::Handle<v8::Value> receiver, int argc, v8::Handle<v8::Value> info[]) |
150 { | 150 { |
151 // Keep LocalFrame (and therefore ScriptController) alive. | 151 // Keep LocalFrame (and therefore ScriptController) alive. |
152 RefPtrWillBeRawPtr<LocalFrame> protect(m_frame.get()); | 152 RefPtrWillBeRawPtr<LocalFrame> protect(m_frame.get()); |
153 return ScriptController::callFunction(m_frame->document(), function, receive
r, argc, info, m_isolate); | 153 return ScriptController::callFunction(m_frame->document(), function, receive
r, argc, info, m_isolate); |
154 } | 154 } |
155 | 155 |
156 v8::Local<v8::Value> ScriptController::callFunction(ExecutionContext* context, v
8::Handle<v8::Function> function, v8::Handle<v8::Value> receiver, int argc, v8::
Handle<v8::Value> info[], v8::Isolate* isolate) | 156 v8::Local<v8::Value> ScriptController::callFunction(ExecutionContext* context, v
8::Handle<v8::Function> function, v8::Handle<v8::Value> receiver, int argc, v8::
Handle<v8::Value> info[], v8::Isolate* isolate) |
157 { | 157 { |
158 TRACE_EVENT1(TRACE_DISABLED_BY_DEFAULT("devtools.timeline"), "FunctionCall",
"data", devToolsTraceEventData(context, function, isolate)); | 158 TRACE_EVENT1(TRACE_DISABLED_BY_DEFAULT("devtools.timeline"), "FunctionCall",
"data", devToolsTraceEventData(isolate, context, function)); |
159 TRACE_EVENT_INSTANT1(TRACE_DISABLED_BY_DEFAULT("devtools.timeline.stack"), "
CallStack", "stack", InspectorCallStackEvent::currentCallStack()); | 159 TRACE_EVENT_INSTANT1(TRACE_DISABLED_BY_DEFAULT("devtools.timeline.stack"), "
CallStack", "stack", InspectorCallStackEvent::currentCallStack()); |
160 // FIXME(361045): remove InspectorInstrumentation calls once DevTools Timeli
ne migrates to tracing. | 160 // FIXME(361045): remove InspectorInstrumentation calls once DevTools Timeli
ne migrates to tracing. |
161 InspectorInstrumentationCookie cookie; | 161 InspectorInstrumentationCookie cookie; |
162 if (InspectorInstrumentation::timelineAgentEnabled(context)) { | 162 if (InspectorInstrumentation::timelineAgentEnabled(context)) { |
163 int scriptId = 0; | 163 int scriptId = 0; |
164 String resourceName; | 164 String resourceName; |
165 int lineNumber = 1; | 165 int lineNumber = 1; |
166 GetDevToolsFunctionInfo(function, isolate, scriptId, resourceName, lineN
umber); | 166 GetDevToolsFunctionInfo(function, isolate, scriptId, resourceName, lineN
umber); |
167 cookie = InspectorInstrumentation::willCallFunction(context, scriptId, r
esourceName, lineNumber); | 167 cookie = InspectorInstrumentation::willCallFunction(context, scriptId, r
esourceName, lineNumber); |
168 } | 168 } |
(...skipping 475 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
644 resultArray->Set(i, evaluationResult); | 644 resultArray->Set(i, evaluationResult); |
645 } | 645 } |
646 | 646 |
647 if (results) { | 647 if (results) { |
648 for (size_t i = 0; i < resultArray->Length(); ++i) | 648 for (size_t i = 0; i < resultArray->Length(); ++i) |
649 results->append(handleScope.Escape(resultArray->Get(i))); | 649 results->append(handleScope.Escape(resultArray->Get(i))); |
650 } | 650 } |
651 } | 651 } |
652 | 652 |
653 } // namespace blink | 653 } // namespace blink |
OLD | NEW |