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.) R=jochen@chromium.org BUG=368095 LOG=N Review URL: https://codereview.chromium.org/265823006 git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@21521 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
This commit is contained in:
parent
620555b495
commit
ee88832bb9
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user