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

Side by Side Diff: src/api.cc

Issue 40317: Added unique id to all scripts (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: '' Created 11 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « src/accessors.cc ('k') | src/bootstrapper.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 2007-2008 the V8 project authors. All rights reserved. 1 // Copyright 2007-2008 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 1036 matching lines...) Expand 10 before | Expand all | Expand 10 after
1047 i::Handle<i::Object> result = 1047 i::Handle<i::Object> result =
1048 i::Execution::Call(fun, receiver, 0, NULL, &has_pending_exception); 1048 i::Execution::Call(fun, receiver, 0, NULL, &has_pending_exception);
1049 EXCEPTION_BAILOUT_CHECK(Local<Value>()); 1049 EXCEPTION_BAILOUT_CHECK(Local<Value>());
1050 raw_result = *result; 1050 raw_result = *result;
1051 } 1051 }
1052 i::Handle<i::Object> result(raw_result); 1052 i::Handle<i::Object> result(raw_result);
1053 return Utils::ToLocal(result); 1053 return Utils::ToLocal(result);
1054 } 1054 }
1055 1055
1056 1056
1057 Local<Value> Script::Id() {
1058 ON_BAILOUT("v8::Script::Id()", return Local<Value>());
1059 LOG_API("Script::Id");
1060 i::Object* raw_id = NULL;
1061 {
1062 HandleScope scope;
1063 i::Handle<i::JSFunction> fun = Utils::OpenHandle(this);
1064 i::Handle<i::Script> script(i::Script::cast(fun->shared()->script()));
1065 i::Handle<i::Object> id(script->id());
1066 raw_id = *id;
1067 }
1068 i::Handle<i::Object> id(raw_id);
1069 return Utils::ToLocal(id);
1070 }
1071
1072
1057 // --- E x c e p t i o n s --- 1073 // --- E x c e p t i o n s ---
1058 1074
1059 1075
1060 v8::TryCatch::TryCatch() 1076 v8::TryCatch::TryCatch()
1061 : next_(i::Top::try_catch_handler()), 1077 : next_(i::Top::try_catch_handler()),
1062 exception_(i::Heap::the_hole_value()), 1078 exception_(i::Heap::the_hole_value()),
1063 message_(i::Smi::FromInt(0)), 1079 message_(i::Smi::FromInt(0)),
1064 is_verbose_(false), 1080 is_verbose_(false),
1065 capture_message_(true), 1081 capture_message_(true),
1066 js_handler_(NULL) { 1082 js_handler_(NULL) {
(...skipping 1972 matching lines...) Expand 10 before | Expand all | Expand 10 after
3039 reinterpret_cast<HandleScopeImplementer*>(storage); 3055 reinterpret_cast<HandleScopeImplementer*>(storage);
3040 List<void**>* blocks_of_archived_thread = thread_local->Blocks(); 3056 List<void**>* blocks_of_archived_thread = thread_local->Blocks();
3041 v8::ImplementationUtilities::HandleScopeData* handle_data_of_archived_thread = 3057 v8::ImplementationUtilities::HandleScopeData* handle_data_of_archived_thread =
3042 &thread_local->handle_scope_data_; 3058 &thread_local->handle_scope_data_;
3043 Iterate(v, blocks_of_archived_thread, handle_data_of_archived_thread); 3059 Iterate(v, blocks_of_archived_thread, handle_data_of_archived_thread);
3044 3060
3045 return storage + ArchiveSpacePerThread(); 3061 return storage + ArchiveSpacePerThread();
3046 } 3062 }
3047 3063
3048 } } // namespace v8::internal 3064 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/accessors.cc ('k') | src/bootstrapper.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698