src/jdk/nashorn/internal/objects/NativeReferenceError.java

Print this page

        

@@ -60,17 +60,19 @@
 
     static PropertyMap getInitialMap() {
         return $nasgenmap$;
     }
 
+    @SuppressWarnings("LeakingThisInConstructor")
     private NativeReferenceError(final Object msg, final ScriptObject proto, final PropertyMap map) {
         super(proto, map);
         if (msg != UNDEFINED) {
             this.instMessage = JSType.toString(msg);
         } else {
             this.delete(NativeError.MESSAGE, false);
         }
+        NativeError.initException(this);
     }
 
     NativeReferenceError(final Object msg, final Global global) {
         this(msg, global.getReferenceErrorPrototype(), global.getReferenceErrorMap());
     }