MCPcopy
hub / github.com/patriksimek/vm2 / validateHandlerTarget

Function validateHandlerTarget

lib/bridge.js:447–450  ·  view source on GitHub ↗
(handler, target)

Source from the content-addressed store, hash-verified

445 // Throws VMError(OPNA) on either, the same error used elsewhere for
446 // boundary violations, so attackers learn nothing about internal state.
447 function validateHandlerTarget(handler, target) {
448 if (!thisReflectApply(thisWeakMapHas, handlerToTarget, [handler])) throw new VMError(OPNA);
449 if (thisReflectApply(thisWeakMapGet, handlerToTarget, [handler]) !== target) throw new VMError(OPNA);
450 }
451
452 // Closure-scoped function to retrieve the factory from a handler.
453 // This is NOT a method on BaseHandler, so it cannot be called by attackers

Callers 15

getMethod · 0.85
setMethod · 0.85
getPrototypeOfMethod · 0.85
setPrototypeOfMethod · 0.85
applyMethod · 0.85
constructMethod · 0.85
definePropertyDescMethod · 0.85
definePropertyMethod · 0.85
deletePropertyMethod · 0.85
hasMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…