[Pkg-mozext-commits] [firebug] 42/82: Disallow deleting closure variables

David Prévot taffit at moszumanska.debian.org
Mon Mar 31 22:45:39 UTC 2014


This is an automated email from the git hooks/post-receive script.

taffit pushed a commit to tag fbtest-1.11.2
in repository firebug.

commit 05bdd2dab08802e66b7cac2ceb0d8bd179676e40
Author: Simon Lindholm <simon.lindholm10 at gmail.com>
Date:   Wed Jan 2 00:27:32 2013 +0100

    Disallow deleting closure variables
    
    This exception is slightly more informative than "undefined is not a
    function".
---
 extension/content/firebug/console/closureInspector.js | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/extension/content/firebug/console/closureInspector.js b/extension/content/firebug/console/closureInspector.js
index bcbc255..a8fab11 100644
--- a/extension/content/firebug/console/closureInspector.js
+++ b/extension/content/firebug/console/closureInspector.js
@@ -311,6 +311,11 @@ var ClosureInspector =
             };
         };
         handler.getPropertyDescriptor = handler.getOwnPropertyDescriptor;
+        handler.delete = function(name)
+        {
+            throwUserError(new Error("can't delete closure variable"));
+        };
+        // Other traps are syntactically inaccessible, so we don't need to implement them.
         return Proxy.create(handler);
     },
 

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-mozext/firebug.git



More information about the Pkg-mozext-commits mailing list