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

Unified Diff: src/global-handles.cc

Issue 9741: Destroyed global handles should not be touched. Added extra... (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 12 years, 1 month 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/global-handles.cc
===================================================================
--- src/global-handles.cc (revision 723)
+++ src/global-handles.cc (working copy)
@@ -96,6 +96,7 @@
// Make this handle weak.
void MakeWeak(void* parameter, WeakReferenceCallback callback) {
LOG(HandleEvent("GlobalHandle::MakeWeak", handle().location()));
+ ASSERT(state_ != DESTROYED);
if (state_ != WEAK && !IsNearDeath()) {
GlobalHandles::number_of_weak_handles_++;
if (object_->IsJSGlobalObject()) {
@@ -109,6 +110,7 @@
void ClearWeakness() {
LOG(HandleEvent("GlobalHandle::ClearWeakness", handle().location()));
+ ASSERT(state_ != DESTROYED);
if (state_ == WEAK || IsNearDeath()) {
GlobalHandles::number_of_weak_handles_--;
if (object_->IsJSGlobalObject()) {
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698