ソースを参照

fixes boot.js `wrappedError()`

Nicolas Petton 10 年 前
コミット
7516c9c39d
1 ファイル変更2 行追加2 行削除
  1. 2 2
      support/boot.js

+ 2 - 2
support/boot.js

@@ -907,12 +907,12 @@ function RuntimeBrik(brikz, st) {
 	 avoid another RangeError later when the stack is manipulated. */
 	function wrappedError(error) {
 		var errorWrapper = st.JavaScriptException._on_(error);
+		// Add the error to the context, so it is visible in the stack
+		try { errorWrapper._signal(); } catch (ex) {}
 		var context = st.getThisContext();
 		if(isRangeError(error)) {
 			stubContextStack(context);
 		}
-		// Set the error to signaled state in the Smalltalk-side
-		try { errorWrapper._signal(); } catch (ex) {}
 		errorWrapper._context_(context);
 		return errorWrapper;
 	}