Reviewers: jochen,

Message:
PTAL.

That first version wasn't meant for review, as both you and the compiler
noticed.. :-P

This triggers a minor bug in the webkit tests, so I'll have to wait for that to
be fixed before submitting.

Description:
Add defensive assert for having a weak, empty presistent in a
PersistentValueMap.

(This shouldn't happen in the first place, but if it does then this
 would explain the stack trace in the referenced bug. If so, zhe
 RELEASE_ASSERT should help us pinpoint the culprit.)

[email protected]
BUG=368095
LOG=N

Please review this at https://codereview.chromium.org/265823006/

SVN Base: https://v8.googlecode.com/svn/branches/bleeding_edge

Affected files (+1, -0 lines):
  M src/global-handles.cc


Index: src/global-handles.cc
diff --git a/src/global-handles.cc b/src/global-handles.cc
index d6cd47918115799311e4409c9c4500083265aead..82b5f3d96b581674b29c8255b95f1cda1594b23a 100644
--- a/src/global-handles.cc
+++ b/src/global-handles.cc
@@ -207,6 +207,7 @@ class GlobalHandles::Node {
   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