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

Side by Side Diff: src/handles.cc

Issue 16035027: DevTools: CPUProfiler: provide url for scripts that have sourceURL property. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: debugger context 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/cpu-profiler.cc ('k') | src/log.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 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 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 581 matching lines...) Expand 10 before | Expand all | Expand 10 after
592 #endif 592 #endif
593 } 593 }
594 } 594 }
595 return v8::Local<v8::Array>::New(reinterpret_cast<v8::Isolate*>(isolate), 595 return v8::Local<v8::Array>::New(reinterpret_cast<v8::Isolate*>(isolate),
596 result); 596 result);
597 } 597 }
598 598
599 599
600 Handle<Object> GetScriptNameOrSourceURL(Handle<Script> script) { 600 Handle<Object> GetScriptNameOrSourceURL(Handle<Script> script) {
601 Isolate* isolate = script->GetIsolate(); 601 Isolate* isolate = script->GetIsolate();
602 if (!isolate->IsInitialized()) {
603 return isolate->factory()->undefined_value();
604 }
602 Handle<String> name_or_source_url_key = 605 Handle<String> name_or_source_url_key =
603 isolate->factory()->InternalizeOneByteString( 606 isolate->factory()->InternalizeOneByteString(
604 STATIC_ASCII_VECTOR("nameOrSourceURL")); 607 STATIC_ASCII_VECTOR("nameOrSourceURL"));
605 Handle<JSValue> script_wrapper = GetScriptWrapper(script); 608 Handle<JSValue> script_wrapper = GetScriptWrapper(script);
606 Handle<Object> property = GetProperty(isolate, 609 Handle<Object> property = GetProperty(isolate,
607 script_wrapper, 610 script_wrapper,
608 name_or_source_url_key); 611 name_or_source_url_key);
609 ASSERT(property->IsJSFunction()); 612 ASSERT(property->IsJSFunction());
610 Handle<JSFunction> method = Handle<JSFunction>::cast(property); 613 Handle<JSFunction> method = Handle<JSFunction>::cast(property);
611 bool caught_exception; 614 bool caught_exception;
(...skipping 312 matching lines...) Expand 10 before | Expand all | Expand 10 after
924 data->next = prev_next_; 927 data->next = prev_next_;
925 data->limit = prev_limit_; 928 data->limit = prev_limit_;
926 #ifdef DEBUG 929 #ifdef DEBUG
927 handles_detached_ = true; 930 handles_detached_ = true;
928 #endif 931 #endif
929 return deferred; 932 return deferred;
930 } 933 }
931 934
932 935
933 } } // namespace v8::internal 936 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/cpu-profiler.cc ('k') | src/log.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698