@@ -177,29 +177,28 @@ void Isolate::init()
177
177
m_topSandbox = new SandBox ();
178
178
m_topSandbox->initRoot ();
179
179
180
- auto assertion_error =
181
- " class AssertionError extends Error {"
182
- " constructor(options) {"
183
- " var { actual, expected, message, operator } = options;"
184
- " if (message) {"
185
- " super(message);"
186
- " } else {"
187
- " if (actual && actual.stack && actual instanceof Error)"
188
- " actual = `${actual.name}: ${actual.message}`;"
189
- " if (expected && expected.stack && expected instanceof Error)"
190
- " expected = `${expected.name}: ${expected.message}`;"
191
- " super(`${JSON.stringify(actual).slice(0, 128)} ` +"
192
- " `${operator} ${JSON.stringify(expected).slice(0, 128)}`);"
193
- " }"
194
- " this.generatedMessage = !message;"
195
- " this.name = 'AssertionError [ERR_ASSERTION]';"
196
- " this.code = 'ERR_ASSERTION';"
197
- " this.actual = actual;"
198
- " this.expected = expected;"
199
- " this.operator = operator;"
200
- " }"
201
- " }"
202
- " AssertionError;" ;
180
+ auto assertion_error = " class AssertionError extends Error {"
181
+ " constructor(options) {"
182
+ " var { actual, expected, message, operator } = options;"
183
+ " if (message) {"
184
+ " super(message);"
185
+ " } else {"
186
+ " if (actual && actual.stack && actual instanceof Error)"
187
+ " actual = `${actual.name}: ${actual.message}`;"
188
+ " if (expected && expected.stack && expected instanceof Error)"
189
+ " expected = `${expected.name}: ${expected.message}`;"
190
+ " super(`${JSON.stringify(actual).slice(0, 128)} ` +"
191
+ " `${operator} ${JSON.stringify(expected).slice(0, 128)}`);"
192
+ " }"
193
+ " this.generatedMessage = !message;"
194
+ " this.name = 'AssertionError [ERR_ASSERTION]';"
195
+ " this.code = 'ERR_ASSERTION';"
196
+ " this.actual = actual;"
197
+ " this.expected = expected;"
198
+ " this.operator = operator;"
199
+ " }"
200
+ " }"
201
+ " AssertionError;" ;
203
202
204
203
v8::Local<v8::Script> script = v8::Script::Compile (NewString (assertion_error));
205
204
v8::Local<v8::Object> AssertionError = script->Run ().As <v8::Object>();
0 commit comments