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 132 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
143 return ScriptController::callFunction(m_frame->document(), function, receive
r, argc, info, m_isolate); | 143 return ScriptController::callFunction(m_frame->document(), function, receive
r, argc, info, m_isolate); |
144 } | 144 } |
145 | 145 |
146 static bool resourceInfo(const v8::Handle<v8::Function> function, String& resour
ceName, int& lineNumber) | 146 static bool resourceInfo(const v8::Handle<v8::Function> function, String& resour
ceName, int& lineNumber) |
147 { | 147 { |
148 v8::ScriptOrigin origin = function->GetScriptOrigin(); | 148 v8::ScriptOrigin origin = function->GetScriptOrigin(); |
149 if (origin.ResourceName().IsEmpty()) { | 149 if (origin.ResourceName().IsEmpty()) { |
150 resourceName = "undefined"; | 150 resourceName = "undefined"; |
151 lineNumber = 1; | 151 lineNumber = 1; |
152 } else { | 152 } else { |
153 V8TRYCATCH_FOR_V8STRINGRESOURCE_RETURN(V8StringResource<>, stringResourc
eName, origin.ResourceName(), false); | 153 V8STRINGRESOURCE_PREPARE_RETURN(V8StringResource<>, stringResourceName,
origin.ResourceName(), false); |
154 resourceName = stringResourceName; | 154 resourceName = stringResourceName; |
155 lineNumber = function->GetScriptLineNumber() + 1; | 155 lineNumber = function->GetScriptLineNumber() + 1; |
156 } | 156 } |
157 return true; | 157 return true; |
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)) { |
(...skipping 466 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
630 v8Results = evaluateHandleScope.Escape(resultArray); | 630 v8Results = evaluateHandleScope.Escape(resultArray); |
631 } | 631 } |
632 | 632 |
633 if (results && !v8Results.IsEmpty()) { | 633 if (results && !v8Results.IsEmpty()) { |
634 for (size_t i = 0; i < v8Results->Length(); ++i) | 634 for (size_t i = 0; i < v8Results->Length(); ++i) |
635 results->append(ScriptValue(v8Results->Get(i), m_isolate)); | 635 results->append(ScriptValue(v8Results->Get(i), m_isolate)); |
636 } | 636 } |
637 } | 637 } |
638 | 638 |
639 } // namespace WebCore | 639 } // namespace WebCore |
OLD | NEW |