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

Unified Diff: src/js/messages.js

Issue 1713663002: Revert of Use displayName in Error.stack rendering if present. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 10 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/api.cc ('k') | src/messages.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/js/messages.js
diff --git a/src/js/messages.js b/src/js/messages.js
index db66fd38c56d87ca6190ad7957204ac469338301..feb14d378844a690de97e4d4e1d4dd323c0841b3 100644
--- a/src/js/messages.js
+++ b/src/js/messages.js
@@ -618,11 +618,6 @@
return %CallSiteGetFunctionNameRT(this);
}
-function CallSiteGetDebugName() {
- // See if the function knows its own name
- return %CallSiteGetDebugNameRT(this);
-}
-
function CallSiteGetMethodName() {
// See if we can find a unique property on the receiver that holds
// this function.
@@ -681,13 +676,10 @@
var line = "";
var functionName = this.getFunctionName();
- var debugName = this.getDebugName();
+ var addSuffix = true;
var isConstructor = this.isConstructor();
var isMethodCall = !(this.isToplevel() || isConstructor);
- if (debugName) {
- if (isConstructor) line += "new ";
- line += debugName;
- } else if (isMethodCall) {
+ if (isMethodCall) {
var typeName = GetTypeName(GET_PRIVATE(this, callSiteReceiverSymbol), true);
var methodName = this.getMethodName();
if (functionName) {
@@ -708,9 +700,13 @@
} else if (functionName) {
line += functionName;
} else {
- return line + fileLocation;
- }
- return line + " (" + fileLocation + ")";
+ line += fileLocation;
+ addSuffix = false;
+ }
+ if (addSuffix) {
+ line += " (" + fileLocation + ")";
+ }
+ return line;
}
utils.SetUpLockedPrototype(CallSite, ["receiver", "fun", "pos"], [
@@ -722,7 +718,6 @@
"getScriptNameOrSourceURL", CallSiteGetScriptNameOrSourceURL,
"getFunction", CallSiteGetFunction,
"getFunctionName", CallSiteGetFunctionName,
- "getDebugName", CallSiteGetDebugName,
"getMethodName", CallSiteGetMethodName,
"getFileName", CallSiteGetFileName,
"getLineNumber", CallSiteGetLineNumber,
« no previous file with comments | « src/api.cc ('k') | src/messages.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698