Skip to content
This repository was archived by the owner on Mar 29, 2024. It is now read-only.

Commit 1800be1

Browse files
committed
Remove bogus asserts
1 parent a789ca7 commit 1800be1

File tree

1 file changed

+2
-7
lines changed

1 file changed

+2
-7
lines changed

src/php_v8_object.cc

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,6 @@ bool php_v8_object_store_self_ptr(php_v8_value_t *php_v8_value, v8::Local<v8::Ob
5858
{
5959
assert(NULL != v8::Isolate::GetCurrent());
6060
assert(v8::Isolate::GetCurrent()->InContext());
61-
assert(v8::Isolate::GetCurrent()->GetCurrentContext() == local_object->CreationContext());
6261

6362
v8::Local<v8::Private> key = php_v8_isolate_get_key_local(php_v8_value->php_v8_isolate);
6463
assert(!key.IsEmpty());
@@ -79,13 +78,8 @@ bool php_v8_object_store_self_ptr(php_v8_value_t *php_v8_value, v8::Local<v8::Ob
7978

8079
php_v8_value_t * php_v8_object_get_self_ptr(php_v8_isolate_t *php_v8_isolate, v8::Local<v8::Object> local_object)
8180
{
82-
//assert(isolate->InContext())
8381
assert(NULL != v8::Isolate::GetCurrent());
8482
assert(v8::Isolate::GetCurrent()->InContext());
85-
assert(v8::Isolate::GetCurrent()->GetCurrentContext() == local_object->CreationContext());
86-
87-
// PHP_V8_ISOLATE_ENTER(isolate);
88-
// PHP_V8_CONTEXT_ENTER(local_object->CreationContext());
8983

9084
v8::Local<v8::Private> key = php_v8_isolate_get_key_local(php_v8_isolate);
9185
assert(!key.IsEmpty());
@@ -98,7 +92,8 @@ php_v8_value_t * php_v8_object_get_self_ptr(php_v8_isolate_t *php_v8_isolate, v8
9892

9993
v8::Local<v8::Value> local_value = maybe_local_value.ToLocalChecked();
10094

101-
//assert(local_value->IsExternal()); // TODO: for some reason this check fails, but value IS external
95+
// for some reason this check fails, but value IS external
96+
//assert(local_value->IsExternal());
10297

10398
return static_cast<php_v8_value_t *>(local_value.As<v8::External>()->Value());
10499
}

0 commit comments

Comments
 (0)