[gjs] Change the way we trigger a warning in testDebugger



commit bf59b2db4ff672287581c5d3bf5abfaa4aad6e1a
Author: Owen W. Taylor <otaylor fishsoup net>
Date:   Thu Apr 30 19:27:18 2009 -0400

    Change the way we trigger a warning in testDebugger
    
    let x = <something undefined> doesn't seem to trigger a warning
    (and our error hook) with xulrunner-1.9.1, so switch to
    new String(<something undefined>).
    
    http://bugzilla.gnome.org/show_bug.cgi?id=580957
---
 test/js/testDebugger.js |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/test/js/testDebugger.js b/test/js/testDebugger.js
index 968bdaf..aab2386 100644
--- a/test/js/testDebugger.js
+++ b/test/js/testDebugger.js
@@ -16,10 +16,10 @@ function testSetDebugErrorHook() {
     };
 
     let faulty = function() {
-        /* This is a non-obvious way to get an exception raised,
+        /* This is a non-obvious way to get a warning
          * just to workaround the error detection in js2-mode.
          * */
-        let x = faulty['undefinedProperty'];
+        new String(faulty['undefinedProperty']);
     };
 
     let old = Debugger.setDebugErrorHook(errorHook);



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]