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 * | 4 * |
5 * Redistribution and use in source and binary forms, with or without | 5 * Redistribution and use in source and binary forms, with or without |
6 * modification, are permitted provided that the following conditions are | 6 * modification, are permitted provided that the following conditions are |
7 * met: | 7 * met: |
8 * | 8 * |
9 * * Redistributions of source code must retain the above copyright | 9 * * Redistributions of source code must retain the above copyright |
10 * notice, this list of conditions and the following disclaimer. | 10 * notice, this list of conditions and the following disclaimer. |
(...skipping 147 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
158 } | 158 } |
159 | 159 |
160 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) | 160 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) |
161 { | 161 { |
162 InspectorInstrumentationCookie cookie; | 162 InspectorInstrumentationCookie cookie; |
163 if (InspectorInstrumentation::timelineAgentEnabled(context)) { | 163 if (InspectorInstrumentation::timelineAgentEnabled(context)) { |
164 String resourceName; | 164 String resourceName; |
165 int lineNumber; | 165 int lineNumber; |
166 if (!resourceInfo(getBoundFunction(function), resourceName, lineNumber)) | 166 if (!resourceInfo(getBoundFunction(function), resourceName, lineNumber)) |
167 return v8::Local<v8::Value>(); | 167 return v8::Local<v8::Value>(); |
168 cookie = InspectorInstrumentation::willCallFunction(context, resourceNam e, lineNumber); | 168 cookie = InspectorInstrumentation::willCallFunction(context, function->S criptId(), resourceName, lineNumber); |
pfeldman
2014/03/26 16:28:58
Do we need the resourceName though?
| |
169 } | 169 } |
170 | 170 |
171 v8::Local<v8::Value> result = V8ScriptRunner::callFunction(function, context , receiver, argc, info, isolate); | 171 v8::Local<v8::Value> result = V8ScriptRunner::callFunction(function, context , receiver, argc, info, isolate); |
172 | 172 |
173 InspectorInstrumentation::didCallFunction(cookie); | 173 InspectorInstrumentation::didCallFunction(cookie); |
174 return result; | 174 return result; |
175 } | 175 } |
176 | 176 |
177 v8::Local<v8::Value> ScriptController::executeScriptAndReturnValue(v8::Handle<v8 ::Context> context, const ScriptSourceCode& source, AccessControlStatus corsStat us) | 177 v8::Local<v8::Value> ScriptController::executeScriptAndReturnValue(v8::Handle<v8 ::Context> context, const ScriptSourceCode& source, AccessControlStatus corsStat us) |
178 { | 178 { |
(...skipping 460 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
639 v8Results = evaluateHandleScope.Escape(resultArray); | 639 v8Results = evaluateHandleScope.Escape(resultArray); |
640 } | 640 } |
641 | 641 |
642 if (results && !v8Results.IsEmpty()) { | 642 if (results && !v8Results.IsEmpty()) { |
643 for (size_t i = 0; i < v8Results->Length(); ++i) | 643 for (size_t i = 0; i < v8Results->Length(); ++i) |
644 results->append(ScriptValue(v8Results->Get(i), m_isolate)); | 644 results->append(ScriptValue(v8Results->Get(i), m_isolate)); |
645 } | 645 } |
646 } | 646 } |
647 | 647 |
648 } // namespace WebCore | 648 } // namespace WebCore |
OLD | NEW |