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

Unified Diff: src/log.cc

Issue 16940005: Revert "DevTools: CPUProfiler: provide url for scripts that have sourceURL property." (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 years, 6 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/handles.cc ('k') | test/cctest/test-cpu-profiler.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/log.cc
diff --git a/src/log.cc b/src/log.cc
index 1d545af2c42456721fa0b5c0c12ea7c74e78d27b..908a3682b83150d42254484eae3ab3fa251b214d 100644
--- a/src/log.cc
+++ b/src/log.cc
@@ -1728,18 +1728,10 @@ void Logger::LogExistingFunction(Handle<SharedFunctionInfo> shared,
Handle<String> func_name(shared->DebugName());
if (shared->script()->IsScript()) {
Handle<Script> script(Script::cast(shared->script()));
- Handle<String> script_name;
if (script->name()->IsString()) {
- script_name = Handle<String>(String::cast(script->name()));
- } else {
- Handle<Object> name = GetScriptNameOrSourceURL(script);
- if (!name.is_null() && name->IsString()) {
- script_name = Handle<String>::cast(name);
- }
- }
- if (!script_name.is_null()) {
+ Handle<String> script_name(String::cast(script->name()));
int line_num = GetScriptLineNumber(script, shared->start_position());
- if (line_num > -1) {
+ if (line_num > 0) {
PROFILE(isolate_,
CodeCreateEvent(
Logger::ToNativeByScript(Logger::LAZY_COMPILE_TAG, *script),
« no previous file with comments | « src/handles.cc ('k') | test/cctest/test-cpu-profiler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698