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

Side by Side Diff: src/api.cc

Issue 449010: Merge revisions r3372 - r3374 to trunk... (Closed) Base URL: http://v8.googlecode.com/svn/trunk/
Patch Set: Created 11 years 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/factory.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 2009 the V8 project authors. All rights reserved. 1 // Copyright 2009 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 433 matching lines...) Expand 10 before | Expand all | Expand 10 after
444 "Cannot exit non-entered context")) { 444 "Cannot exit non-entered context")) {
445 return; 445 return;
446 } 446 }
447 447
448 // Content of 'last_context' could be NULL. 448 // Content of 'last_context' could be NULL.
449 i::Context* last_context = thread_local.RestoreContext(); 449 i::Context* last_context = thread_local.RestoreContext();
450 i::Top::set_context(last_context); 450 i::Top::set_context(last_context);
451 } 451 }
452 452
453 453
454 void Context::SetData(v8::Handle<Value> data) { 454 void Context::SetData(v8::Handle<String> data) {
455 if (IsDeadCheck("v8::Context::SetData()")) return; 455 if (IsDeadCheck("v8::Context::SetData()")) return;
456 ENTER_V8; 456 ENTER_V8;
457 { 457 {
458 HandleScope scope; 458 HandleScope scope;
459 i::Handle<i::Context> env = Utils::OpenHandle(this); 459 i::Handle<i::Context> env = Utils::OpenHandle(this);
460 i::Handle<i::Object> raw_data = Utils::OpenHandle(*data); 460 i::Handle<i::Object> raw_data = Utils::OpenHandle(*data);
461 ASSERT(env->IsGlobalContext()); 461 ASSERT(env->IsGlobalContext());
462 if (env->IsGlobalContext()) { 462 if (env->IsGlobalContext()) {
463 env->set_data(*raw_data); 463 env->set_data(*raw_data);
464 } 464 }
(...skipping 703 matching lines...) Expand 10 before | Expand all | Expand 10 after
1168 i::Handle<i::JSFunction> fun = Utils::OpenHandle(this); 1168 i::Handle<i::JSFunction> fun = Utils::OpenHandle(this);
1169 i::Handle<i::Script> script(i::Script::cast(fun->shared()->script())); 1169 i::Handle<i::Script> script(i::Script::cast(fun->shared()->script()));
1170 i::Handle<i::Object> id(script->id()); 1170 i::Handle<i::Object> id(script->id());
1171 raw_id = *id; 1171 raw_id = *id;
1172 } 1172 }
1173 i::Handle<i::Object> id(raw_id); 1173 i::Handle<i::Object> id(raw_id);
1174 return Utils::ToLocal(id); 1174 return Utils::ToLocal(id);
1175 } 1175 }
1176 1176
1177 1177
1178 void Script::SetData(v8::Handle<Value> data) { 1178 void Script::SetData(v8::Handle<String> data) {
1179 ON_BAILOUT("v8::Script::SetData()", return); 1179 ON_BAILOUT("v8::Script::SetData()", return);
1180 LOG_API("Script::SetData"); 1180 LOG_API("Script::SetData");
1181 { 1181 {
1182 HandleScope scope; 1182 HandleScope scope;
1183 i::Handle<i::JSFunction> fun = Utils::OpenHandle(this); 1183 i::Handle<i::JSFunction> fun = Utils::OpenHandle(this);
1184 i::Handle<i::Object> raw_data = Utils::OpenHandle(*data); 1184 i::Handle<i::Object> raw_data = Utils::OpenHandle(*data);
1185 i::Handle<i::Script> script(i::Script::cast(fun->shared()->script())); 1185 i::Handle<i::Script> script(i::Script::cast(fun->shared()->script()));
1186 script->set_data(*raw_data); 1186 script->set_data(*raw_data);
1187 } 1187 }
1188 } 1188 }
(...skipping 2677 matching lines...) Expand 10 before | Expand all | Expand 10 after
3866 3866
3867 3867
3868 char* HandleScopeImplementer::Iterate(ObjectVisitor* v, char* storage) { 3868 char* HandleScopeImplementer::Iterate(ObjectVisitor* v, char* storage) {
3869 HandleScopeImplementer* thread_local = 3869 HandleScopeImplementer* thread_local =
3870 reinterpret_cast<HandleScopeImplementer*>(storage); 3870 reinterpret_cast<HandleScopeImplementer*>(storage);
3871 thread_local->IterateThis(v); 3871 thread_local->IterateThis(v);
3872 return storage + ArchiveSpacePerThread(); 3872 return storage + ArchiveSpacePerThread();
3873 } 3873 }
3874 3874
3875 } } // namespace v8::internal 3875 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/accessors.cc ('k') | src/factory.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698