Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[demo][acl] __hook__acl should be used instead of __hook__ in demo/hook-callback.js #230

Open
t2ym opened this issue Mar 6, 2018 · 0 comments

Comments

@t2ym
Copy link
Owner

t2ym commented Mar 6, 2018

[demo][acl] __hook__acl should be used instead of __hook__ in demo/hook-callback.js

Since __hook__ has significant overheads for constructing object access graphs, __hook__acl should be used instead.

Change to use __hook__acl

  • Diff
diff --git a/demo/hook-callback.js b/demo/hook-callback.js
index 391961e..6dfdcc6 100644
--- a/demo/hook-callback.js
+++ b/demo/hook-callback.js
@@ -6869,7 +6869,7 @@ Copyright (c) 2017, Tetsuya Mori <t2y3141592@gmail.com>. All rights reserved.
     __hook__min, // minimal (no acl)
   };
 
-  Object.defineProperty(_global, '__hook__', { configurable: false, enumerable: false, writable: false, value: hookCallbacks.__hook__ });
+  Object.defineProperty(_global, '__hook__', { configurable: false, enumerable: false, writable: false, value: hookCallbacks.__hook__acl });
   _globalObjects.set(_global.__hook__, '__hook__');
 
   hook.hookCallbackCompatibilityTest();
  • If the modified hook-callback.js is used for the demo, gulp demo is required after the modification.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant