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

Side by Side Diff: src/api.cc

Issue 218993005: Tighten object verification. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 8 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 | « no previous file | 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 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 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 515 matching lines...) Expand 10 before | Expand all | Expand 10 after
526 526
527 isolate->set_max_available_threads(constraints->max_available_threads()); 527 isolate->set_max_available_threads(constraints->max_available_threads());
528 return true; 528 return true;
529 } 529 }
530 530
531 531
532 i::Object** V8::GlobalizeReference(i::Isolate* isolate, i::Object** obj) { 532 i::Object** V8::GlobalizeReference(i::Isolate* isolate, i::Object** obj) {
533 LOG_API(isolate, "Persistent::New"); 533 LOG_API(isolate, "Persistent::New");
534 i::Handle<i::Object> result = isolate->global_handles()->Create(*obj); 534 i::Handle<i::Object> result = isolate->global_handles()->Create(*obj);
535 #ifdef DEBUG 535 #ifdef DEBUG
536 (*obj)->Verify(); 536 (*obj)->ObjectVerify();
537 #endif // DEBUG 537 #endif // DEBUG
538 return result.location(); 538 return result.location();
539 } 539 }
540 540
541 541
542 i::Object** V8::CopyPersistent(i::Object** obj) { 542 i::Object** V8::CopyPersistent(i::Object** obj) {
543 i::Handle<i::Object> result = i::GlobalHandles::CopyGlobal(obj); 543 i::Handle<i::Object> result = i::GlobalHandles::CopyGlobal(obj);
544 #ifdef DEBUG 544 #ifdef DEBUG
545 (*obj)->Verify(); 545 (*obj)->ObjectVerify();
546 #endif // DEBUG 546 #endif // DEBUG
547 return result.location(); 547 return result.location();
548 } 548 }
549 549
550 550
551 void V8::MakeWeak(i::Object** object, 551 void V8::MakeWeak(i::Object** object,
552 void* parameters, 552 void* parameters,
553 WeakCallback weak_callback) { 553 WeakCallback weak_callback) {
554 i::GlobalHandles::MakeWeak(object, parameters, weak_callback); 554 i::GlobalHandles::MakeWeak(object, parameters, weak_callback);
555 } 555 }
(...skipping 7097 matching lines...) Expand 10 before | Expand all | Expand 10 after
7653 Isolate* isolate = reinterpret_cast<Isolate*>(info.GetIsolate()); 7653 Isolate* isolate = reinterpret_cast<Isolate*>(info.GetIsolate());
7654 Address callback_address = 7654 Address callback_address =
7655 reinterpret_cast<Address>(reinterpret_cast<intptr_t>(callback)); 7655 reinterpret_cast<Address>(reinterpret_cast<intptr_t>(callback));
7656 VMState<EXTERNAL> state(isolate); 7656 VMState<EXTERNAL> state(isolate);
7657 ExternalCallbackScope call_scope(isolate, callback_address); 7657 ExternalCallbackScope call_scope(isolate, callback_address);
7658 callback(info); 7658 callback(info);
7659 } 7659 }
7660 7660
7661 7661
7662 } } // namespace v8::internal 7662 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « no previous file | src/bootstrapper.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698