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

Side by Side Diff: Source/core/inspector/InjectedScriptBase.cpp

Issue 212953003: TimelinePanel: provide scriptId in FunctionCall event. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: minor change Created 6 years, 8 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 | Annotate | Revision Log
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2012 Google Inc. All rights reserved. 2 * Copyright (C) 2012 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
68 } 68 }
69 69
70 const ScriptObject& InjectedScriptBase::injectedScriptObject() const 70 const ScriptObject& InjectedScriptBase::injectedScriptObject() const
71 { 71 {
72 return m_injectedScriptObject; 72 return m_injectedScriptObject;
73 } 73 }
74 74
75 ScriptValue InjectedScriptBase::callFunctionWithEvalEnabled(ScriptFunctionCall& function, bool& hadException) const 75 ScriptValue InjectedScriptBase::callFunctionWithEvalEnabled(ScriptFunctionCall& function, bool& hadException) const
76 { 76 {
77 ExecutionContext* executionContext = m_injectedScriptObject.scriptState()->e xecutionContext(); 77 ExecutionContext* executionContext = m_injectedScriptObject.scriptState()->e xecutionContext();
78 InspectorInstrumentationCookie cookie = InspectorInstrumentation::willCallFu nction(executionContext, name(), 1); 78 InspectorInstrumentationCookie cookie = InspectorInstrumentation::willCallFu nction(executionContext, 0, name(), 1);
79 79
80 ScriptState* scriptState = m_injectedScriptObject.scriptState(); 80 ScriptState* scriptState = m_injectedScriptObject.scriptState();
81 bool evalIsDisabled = false; 81 bool evalIsDisabled = false;
82 if (scriptState) { 82 if (scriptState) {
83 evalIsDisabled = !scriptState->evalEnabled(); 83 evalIsDisabled = !scriptState->evalEnabled();
84 // Temporarily enable allow evals for inspector. 84 // Temporarily enable allow evals for inspector.
85 if (evalIsDisabled) 85 if (evalIsDisabled)
86 scriptState->setEvalEnabled(true); 86 scriptState->setEvalEnabled(true);
87 } 87 }
88 88
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
138 if (!resultObj || !resultPair->getBoolean("wasThrown", &wasThrownVal)) { 138 if (!resultObj || !resultPair->getBoolean("wasThrown", &wasThrownVal)) {
139 *errorString = "Internal error: result is not a pair of value and wasThr own flag"; 139 *errorString = "Internal error: result is not a pair of value and wasThr own flag";
140 return; 140 return;
141 } 141 }
142 *objectResult = TypeBuilder::Runtime::RemoteObject::runtimeCast(resultObj); 142 *objectResult = TypeBuilder::Runtime::RemoteObject::runtimeCast(resultObj);
143 *wasThrown = wasThrownVal; 143 *wasThrown = wasThrownVal;
144 } 144 }
145 145
146 } // namespace WebCore 146 } // namespace WebCore
147 147
OLDNEW
« no previous file with comments | « Source/bindings/v8/V8WorkerGlobalScopeEventListener.cpp ('k') | Source/core/inspector/InspectorInstrumentation.idl » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698