Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(708)

Unified Diff: src/messages.cc

Issue 2169563003: Revert of Remove stack overflow boilerplate (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/messages.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/messages.cc
diff --git a/src/messages.cc b/src/messages.cc
index cc6f81306b804c7792e5c6d62c31d275f1843cfc..9809be58571a1b72800dde7ccc926ca58eb3bb6f 100644
--- a/src/messages.cc
+++ b/src/messages.cc
@@ -5,7 +5,6 @@
#include "src/messages.h"
#include "src/api.h"
-#include "src/bootstrapper.h"
#include "src/execution.h"
#include "src/isolate-inl.h"
#include "src/keys.h"
@@ -448,52 +447,6 @@
return builder.Finish();
}
-MaybeHandle<Object> ConstructError(Isolate* isolate, Handle<JSFunction> target,
- Handle<Object> new_target,
- Handle<Object> message, FrameSkipMode mode,
- bool suppress_detailed_trace) {
- // 1. If NewTarget is undefined, let newTarget be the active function object,
- // else let newTarget be NewTarget.
-
- Handle<JSReceiver> new_target_recv =
- new_target->IsJSReceiver() ? Handle<JSReceiver>::cast(new_target)
- : Handle<JSReceiver>::cast(target);
-
- // 2. Let O be ? OrdinaryCreateFromConstructor(newTarget, "%ErrorPrototype%",
- // « [[ErrorData]] »).
- Handle<JSObject> err;
- ASSIGN_RETURN_ON_EXCEPTION(isolate, err,
- JSObject::New(target, new_target_recv), Object);
-
- // 3. If message is not undefined, then
- // a. Let msg be ? ToString(message).
- // b. Let msgDesc be the PropertyDescriptor{[[Value]]: msg, [[Writable]]:
- // true, [[Enumerable]]: false, [[Configurable]]: true}.
- // c. Perform ! DefinePropertyOrThrow(O, "message", msgDesc).
- // 4. Return O.
-
- if (!message->IsUndefined(isolate)) {
- Handle<String> msg_string;
- ASSIGN_RETURN_ON_EXCEPTION(isolate, msg_string,
- Object::ToString(isolate, message), Object);
- RETURN_ON_EXCEPTION(isolate, JSObject::SetOwnPropertyIgnoreAttributes(
- err, isolate->factory()->message_string(),
- msg_string, DONT_ENUM),
- Object);
- }
-
- // Optionally capture a more detailed stack trace for the message.
- if (!suppress_detailed_trace) {
- RETURN_ON_EXCEPTION(isolate, isolate->CaptureAndSetDetailedStackTrace(err),
- Object);
- }
- // Capture a simple stack trace for the stack property.
- RETURN_ON_EXCEPTION(isolate, isolate->CaptureAndSetSimpleStackTrace(
- err, mode, Handle<Object>()),
- Object);
-
- return err;
-}
} // namespace internal
} // namespace v8
« no previous file with comments | « src/messages.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698