1// Copyright 2015 the V8 project authors. All rights reserved. 2// Use of this source code is governed by a BSD-style license that can be 3// found in the LICENSE file. 4 5(function(global, utils) { 6 7"use strict"; 8 9%CheckIsBootstrapping(); 10 11// ---------------------------------------------------------------------------- 12// Imports 13// 14var GlobalProxy = global.Proxy; 15 16//---------------------------------------------------------------------------- 17 18function ProxyCreateRevocable(target, handler) { 19 var p = new GlobalProxy(target, handler); 20 return {proxy: p, revoke: () => %JSProxyRevoke(p)}; 21} 22 23//------------------------------------------------------------------- 24 25//Set up non-enumerable properties of the Proxy object. 26utils.InstallFunctions(GlobalProxy, DONT_ENUM, [ 27 "revocable", ProxyCreateRevocable 28]); 29 30}) 31