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

Side by Side Diff: src/api.cc

Issue 454001: Merge revisions r3372 - r3374 to trunk... (Closed) Base URL: http://v8.googlecode.com/svn/branches/1.3/
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/handles.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 432 matching lines...) Expand 10 before | Expand all | Expand 10 after
443 "Cannot exit non-entered context")) { 443 "Cannot exit non-entered context")) {
444 return; 444 return;
445 } 445 }
446 446
447 // Content of 'last_context' could be NULL. 447 // Content of 'last_context' could be NULL.
448 i::Context* last_context = thread_local.RestoreContext(); 448 i::Context* last_context = thread_local.RestoreContext();
449 i::Top::set_context(last_context); 449 i::Top::set_context(last_context);
450 } 450 }
451 451
452 452
453 void Context::SetData(v8::Handle<Value> data) { 453 void Context::SetData(v8::Handle<String> data) {
454 if (IsDeadCheck("v8::Context::SetData()")) return; 454 if (IsDeadCheck("v8::Context::SetData()")) return;
455 ENTER_V8; 455 ENTER_V8;
456 { 456 {
457 HandleScope scope; 457 HandleScope scope;
458 i::Handle<i::Context> env = Utils::OpenHandle(this); 458 i::Handle<i::Context> env = Utils::OpenHandle(this);
459 i::Handle<i::Object> raw_data = Utils::OpenHandle(*data); 459 i::Handle<i::Object> raw_data = Utils::OpenHandle(*data);
460 ASSERT(env->IsGlobalContext()); 460 ASSERT(env->IsGlobalContext());
461 if (env->IsGlobalContext()) { 461 if (env->IsGlobalContext()) {
462 env->set_data(*raw_data); 462 env->set_data(*raw_data);
463 } 463 }
(...skipping 703 matching lines...) Expand 10 before | Expand all | Expand 10 after
1167 i::Handle<i::JSFunction> fun = Utils::OpenHandle(this); 1167 i::Handle<i::JSFunction> fun = Utils::OpenHandle(this);
1168 i::Handle<i::Script> script(i::Script::cast(fun->shared()->script())); 1168 i::Handle<i::Script> script(i::Script::cast(fun->shared()->script()));
1169 i::Handle<i::Object> id(script->id()); 1169 i::Handle<i::Object> id(script->id());
1170 raw_id = *id; 1170 raw_id = *id;
1171 } 1171 }
1172 i::Handle<i::Object> id(raw_id); 1172 i::Handle<i::Object> id(raw_id);
1173 return Utils::ToLocal(id); 1173 return Utils::ToLocal(id);
1174 } 1174 }
1175 1175
1176 1176
1177 void Script::SetData(v8::Handle<Value> data) { 1177 void Script::SetData(v8::Handle<String> data) {
1178 ON_BAILOUT("v8::Script::SetData()", return); 1178 ON_BAILOUT("v8::Script::SetData()", return);
1179 LOG_API("Script::SetData"); 1179 LOG_API("Script::SetData");
1180 { 1180 {
1181 HandleScope scope; 1181 HandleScope scope;
1182 i::Handle<i::JSFunction> fun = Utils::OpenHandle(this); 1182 i::Handle<i::JSFunction> fun = Utils::OpenHandle(this);
1183 i::Handle<i::Object> raw_data = Utils::OpenHandle(*data); 1183 i::Handle<i::Object> raw_data = Utils::OpenHandle(*data);
1184 i::Handle<i::Script> script(i::Script::cast(fun->shared()->script())); 1184 i::Handle<i::Script> script(i::Script::cast(fun->shared()->script()));
1185 script->set_data(*raw_data); 1185 script->set_data(*raw_data);
1186 } 1186 }
1187 } 1187 }
(...skipping 2669 matching lines...) Expand 10 before | Expand all | Expand 10 after
3857 3857
3858 3858
3859 char* HandleScopeImplementer::Iterate(ObjectVisitor* v, char* storage) { 3859 char* HandleScopeImplementer::Iterate(ObjectVisitor* v, char* storage) {
3860 HandleScopeImplementer* thread_local = 3860 HandleScopeImplementer* thread_local =
3861 reinterpret_cast<HandleScopeImplementer*>(storage); 3861 reinterpret_cast<HandleScopeImplementer*>(storage);
3862 thread_local->IterateThis(v); 3862 thread_local->IterateThis(v);
3863 return storage + ArchiveSpacePerThread(); 3863 return storage + ArchiveSpacePerThread();
3864 } 3864 }
3865 3865
3866 } } // namespace v8::internal 3866 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/accessors.cc ('k') | src/handles.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698