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

Side by Side Diff: src/api.cc

Issue 5581006: Checking heap objects in API. (Closed)
Patch Set: Created 10 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
« no previous file with comments | « include/v8.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2010 the V8 project authors. All rights reserved. 1 // Copyright 2010 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 499 matching lines...) Expand 10 before | Expand all | Expand 10 after
510 EnsureInitialized("HandleScope::NumberOfHandles"); 510 EnsureInitialized("HandleScope::NumberOfHandles");
511 return i::HandleScope::NumberOfHandles(); 511 return i::HandleScope::NumberOfHandles();
512 } 512 }
513 513
514 514
515 i::Object** v8::HandleScope::CreateHandle(i::Object* value) { 515 i::Object** v8::HandleScope::CreateHandle(i::Object* value) {
516 return i::HandleScope::CreateHandle(value, i::Isolate::Current()); 516 return i::HandleScope::CreateHandle(value, i::Isolate::Current());
517 } 517 }
518 518
519 519
520 i::Object** v8::HandleScope::CreateHandleFromHeapObject(i::Object* value) {
521 return i::HandleScope::CreateHandle(value, i::Isolate::Current());
522 }
523
524
520 void Context::Enter() { 525 void Context::Enter() {
521 if (IsDeadCheck("v8::Context::Enter()")) return; 526 if (IsDeadCheck("v8::Context::Enter()")) return;
522 ENTER_V8; 527 ENTER_V8;
523 i::Handle<i::Context> env = Utils::OpenHandle(this); 528 i::Handle<i::Context> env = Utils::OpenHandle(this);
524 // TODO(isolates): Context should have a pointer to isolate. 529 // TODO(isolates): Context should have a pointer to isolate.
525 i::Isolate* isolate = i::Isolate::Current(); 530 i::Isolate* isolate = i::Isolate::Current();
526 isolate->handle_scope_implementer()->EnterContext(env); 531 isolate->handle_scope_implementer()->EnterContext(env);
527 532
528 isolate->handle_scope_implementer()->SaveContext(isolate->context()); 533 isolate->handle_scope_implementer()->SaveContext(isolate->context());
529 isolate->set_context(*env); 534 isolate->set_context(*env);
(...skipping 4477 matching lines...) Expand 10 before | Expand all | Expand 10 after
5007 5012
5008 5013
5009 char* HandleScopeImplementer::Iterate(ObjectVisitor* v, char* storage) { 5014 char* HandleScopeImplementer::Iterate(ObjectVisitor* v, char* storage) {
5010 HandleScopeImplementer* thread_local = 5015 HandleScopeImplementer* thread_local =
5011 reinterpret_cast<HandleScopeImplementer*>(storage); 5016 reinterpret_cast<HandleScopeImplementer*>(storage);
5012 thread_local->IterateThis(v); 5017 thread_local->IterateThis(v);
5013 return storage + ArchiveSpacePerThread(); 5018 return storage + ArchiveSpacePerThread();
5014 } 5019 }
5015 5020
5016 } } // namespace v8::internal 5021 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « include/v8.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698