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

Unified Diff: test/cctest/test-func-name-inference.cc

Issue 669240: - Remove function boilerplate objects and use SharedFunctionInfos in... (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Committed Created 10 years, 9 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 | « test/cctest/test-compiler.cc ('k') | test/cctest/test-log-stack-tracer.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/cctest/test-func-name-inference.cc
===================================================================
--- test/cctest/test-func-name-inference.cc (revision 4210)
+++ test/cctest/test-func-name-inference.cc (working copy)
@@ -62,8 +62,16 @@
const char* func_pos_src,
const char* ref_inferred_name) {
// Get script source.
- Handle<JSFunction> fun = v8::Utils::OpenHandle(*script);
- Handle<Script> i_script(Script::cast(fun->shared()->script()));
+ Handle<Object> obj = v8::Utils::OpenHandle(*script);
+ Handle<SharedFunctionInfo> shared_function;
+ if (obj->IsSharedFunctionInfo()) {
+ shared_function =
+ Handle<SharedFunctionInfo>(SharedFunctionInfo::cast(*obj));
+ } else {
+ shared_function =
+ Handle<SharedFunctionInfo>(JSFunction::cast(*obj)->shared());
+ }
+ Handle<Script> i_script(Script::cast(shared_function->script()));
CHECK(i_script->source()->IsString());
Handle<String> script_src(String::cast(i_script->source()));
« no previous file with comments | « test/cctest/test-compiler.cc ('k') | test/cctest/test-log-stack-tracer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698