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

Side by Side Diff: src/api.cc

Issue 112047: Push bleeding_edge revisions 2004 and 2006 to trunk.... (Closed) Base URL: http://v8.googlecode.com/svn/trunk/
Patch Set: Created 11 years, 7 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 | « include/v8.h ('k') | src/compilation-cache.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 2594 matching lines...) Expand 10 before | Expand all | Expand 10 after
2605 } 2605 }
2606 2606
2607 2607
2608 v8::Local<v8::Context> Context::GetCurrent() { 2608 v8::Local<v8::Context> Context::GetCurrent() {
2609 if (IsDeadCheck("v8::Context::GetCurrent()")) return Local<Context>(); 2609 if (IsDeadCheck("v8::Context::GetCurrent()")) return Local<Context>();
2610 i::Handle<i::Context> context(i::Top::global_context()); 2610 i::Handle<i::Context> context(i::Top::global_context());
2611 return Utils::ToLocal(context); 2611 return Utils::ToLocal(context);
2612 } 2612 }
2613 2613
2614 2614
2615 v8::Local<v8::Context> Context::GetCalling() {
2616 if (IsDeadCheck("v8::Context::GetCalling()")) return Local<Context>();
2617 i::Handle<i::Context> context(i::Top::GetCallingGlobalContext());
2618 return Utils::ToLocal(context);
2619 }
2620
2621
2615 v8::Local<v8::Object> Context::Global() { 2622 v8::Local<v8::Object> Context::Global() {
2616 if (IsDeadCheck("v8::Context::Global()")) return Local<v8::Object>(); 2623 if (IsDeadCheck("v8::Context::Global()")) return Local<v8::Object>();
2617 i::Object** ctx = reinterpret_cast<i::Object**>(this); 2624 i::Object** ctx = reinterpret_cast<i::Object**>(this);
2618 i::Handle<i::Context> context = 2625 i::Handle<i::Context> context =
2619 i::Handle<i::Context>::cast(i::Handle<i::Object>(ctx)); 2626 i::Handle<i::Context>::cast(i::Handle<i::Object>(ctx));
2620 i::Handle<i::Object> global(context->global_proxy()); 2627 i::Handle<i::Object> global(context->global_proxy());
2621 return Utils::ToLocal(i::Handle<i::JSObject>::cast(global)); 2628 return Utils::ToLocal(i::Handle<i::JSObject>::cast(global));
2622 } 2629 }
2623 2630
2624 2631
(...skipping 844 matching lines...) Expand 10 before | Expand all | Expand 10 after
3469 reinterpret_cast<HandleScopeImplementer*>(storage); 3476 reinterpret_cast<HandleScopeImplementer*>(storage);
3470 List<void**>* blocks_of_archived_thread = thread_local->Blocks(); 3477 List<void**>* blocks_of_archived_thread = thread_local->Blocks();
3471 v8::ImplementationUtilities::HandleScopeData* handle_data_of_archived_thread = 3478 v8::ImplementationUtilities::HandleScopeData* handle_data_of_archived_thread =
3472 &thread_local->handle_scope_data_; 3479 &thread_local->handle_scope_data_;
3473 Iterate(v, blocks_of_archived_thread, handle_data_of_archived_thread); 3480 Iterate(v, blocks_of_archived_thread, handle_data_of_archived_thread);
3474 3481
3475 return storage + ArchiveSpacePerThread(); 3482 return storage + ArchiveSpacePerThread();
3476 } 3483 }
3477 3484
3478 } } // namespace v8::internal 3485 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « include/v8.h ('k') | src/compilation-cache.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698