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 b773d0b commit fc0f18cCopy full SHA for fc0f18c
NativeScript/runtime/WeakRef.cpp
@@ -9,8 +9,13 @@ void WeakRef::Init(Local<Context> context) {
9
Isolate* isolate = context->GetIsolate();
10
11
std::string source = R"(
12
- global.WeakRef.prototype.get = global.WeakRef.prototype.deref;
+ global.WeakRef.prototype.get = global.WeakRef.prototype.deref;
13
+ global.WeakRef.prototype.__hasWarnedAboutClear = false;
14
global.WeakRef.prototype.clear = () => {
15
+ if(global.WeakRef.prototype.__hasWarnedAboutClear) {
16
+ return;
17
+ }
18
+ global.WeakRef.prototype.__hasWarnedAboutClear = true;
19
console.warn('WeakRef.clear() is non-standard and has been deprecated. It does nothing and the call can be safely removed.');
20
}
21
)";
0 commit comments