We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b8e02b3 commit d2fdef9Copy full SHA for d2fdef9
bin/NativeTests/JsRTApiTest.cpp
@@ -128,6 +128,11 @@ namespace JsRTApiTest
128
valueRef = JS_INVALID_REFERENCE;
129
valueRefFromWeakRef = JS_INVALID_REFERENCE;
130
131
+ // Prevent optimizations to remove the assignments above
132
+ // as they are not needed from a control-flow perspective.
133
+ CHECK(valueRef == JS_INVALID_REFERENCE);
134
+ CHECK(valueRefFromWeakRef == JS_INVALID_REFERENCE);
135
+
136
CHECK(JsCollectGarbage(runtime) == JsNoError);
137
138
// JsGetWeakReferenceValue should return an invalid reference after the value was GC'd.
0 commit comments