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

Side by Side 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « src/handles.cc ('k') | test/cctest/test-cpu-profiler.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2011 the V8 project authors. All rights reserved. 1 // Copyright 2011 the V8 project authors. All rights reserved.
2 // Redistribution and use in source and binary forms, with or without 2 // Redistribution and use in source and binary forms, with or without
3 // modification, are permitted provided that the following conditions are 3 // modification, are permitted provided that the following conditions are
4 // met: 4 // met:
5 // 5 //
6 // * Redistributions of source code must retain the above copyright 6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer. 7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above 8 // * Redistributions in binary form must reproduce the above
9 // copyright notice, this list of conditions and the following 9 // copyright notice, this list of conditions and the following
10 // disclaimer in the documentation and/or other materials provided 10 // disclaimer in the documentation and/or other materials provided
(...skipping 1710 matching lines...) Expand 10 before | Expand all | Expand 10 after
1721 if (obj->IsCode()) LogCodeObject(obj); 1721 if (obj->IsCode()) LogCodeObject(obj);
1722 } 1722 }
1723 } 1723 }
1724 1724
1725 1725
1726 void Logger::LogExistingFunction(Handle<SharedFunctionInfo> shared, 1726 void Logger::LogExistingFunction(Handle<SharedFunctionInfo> shared,
1727 Handle<Code> code) { 1727 Handle<Code> code) {
1728 Handle<String> func_name(shared->DebugName()); 1728 Handle<String> func_name(shared->DebugName());
1729 if (shared->script()->IsScript()) { 1729 if (shared->script()->IsScript()) {
1730 Handle<Script> script(Script::cast(shared->script())); 1730 Handle<Script> script(Script::cast(shared->script()));
1731 Handle<String> script_name;
1732 if (script->name()->IsString()) { 1731 if (script->name()->IsString()) {
1733 script_name = Handle<String>(String::cast(script->name())); 1732 Handle<String> script_name(String::cast(script->name()));
1734 } else {
1735 Handle<Object> name = GetScriptNameOrSourceURL(script);
1736 if (!name.is_null() && name->IsString()) {
1737 script_name = Handle<String>::cast(name);
1738 }
1739 }
1740 if (!script_name.is_null()) {
1741 int line_num = GetScriptLineNumber(script, shared->start_position()); 1733 int line_num = GetScriptLineNumber(script, shared->start_position());
1742 if (line_num > -1) { 1734 if (line_num > 0) {
1743 PROFILE(isolate_, 1735 PROFILE(isolate_,
1744 CodeCreateEvent( 1736 CodeCreateEvent(
1745 Logger::ToNativeByScript(Logger::LAZY_COMPILE_TAG, *script), 1737 Logger::ToNativeByScript(Logger::LAZY_COMPILE_TAG, *script),
1746 *code, *shared, NULL, 1738 *code, *shared, NULL,
1747 *script_name, line_num + 1)); 1739 *script_name, line_num + 1));
1748 } else { 1740 } else {
1749 // Can't distinguish eval and script here, so always use Script. 1741 // Can't distinguish eval and script here, so always use Script.
1750 PROFILE(isolate_, 1742 PROFILE(isolate_,
1751 CodeCreateEvent( 1743 CodeCreateEvent(
1752 Logger::ToNativeByScript(Logger::SCRIPT_TAG, *script), 1744 Logger::ToNativeByScript(Logger::SCRIPT_TAG, *script),
(...skipping 139 matching lines...) Expand 10 before | Expand all | Expand 10 after
1892 profiler_ = NULL; 1884 profiler_ = NULL;
1893 } 1885 }
1894 1886
1895 delete ticker_; 1887 delete ticker_;
1896 ticker_ = NULL; 1888 ticker_ = NULL;
1897 1889
1898 return log_->Close(); 1890 return log_->Close();
1899 } 1891 }
1900 1892
1901 } } // namespace v8::internal 1893 } } // namespace v8::internal
OLDNEW
« 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