Revision: 21521
Author:   [email protected]
Date:     Tue May 27 12:26:44 2014 UTC
Log: Add defensive assert against a weak callback on an empty persistent.

(This shouldn't happen in the first place, as by definition that callback would never be called. However, the referenced bug sorta looks like this happened. If so, the CHECK should help us pinpoint the culprit.)

[email protected]
BUG=368095
LOG=N

Review URL: https://codereview.chromium.org/265823006
http://code.google.com/p/v8/source/detail?r=21521

Modified:
 /branches/bleeding_edge/src/global-handles.cc

=======================================
--- /branches/bleeding_edge/src/global-handles.cc Tue Apr 29 06:42:26 2014 UTC +++ /branches/bleeding_edge/src/global-handles.cc Tue May 27 12:26:44 2014 UTC
@@ -207,6 +207,7 @@
   void MakeWeak(void* parameter, WeakCallback weak_callback) {
     ASSERT(weak_callback != NULL);
     ASSERT(state() != FREE);
+    CHECK(object_ != NULL);
     set_state(WEAK);
     set_parameter(parameter);
     weak_callback_ = weak_callback;

--
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
--- You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to