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

Side by Side Diff: src/messages.js

Issue 1559006: Remove trailing regexp from .js files. (Closed)
Patch Set: Created 10 years, 8 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 unified diff | Download patch
« no previous file with comments | « src/liveedit-debugger.js ('k') | src/mirror-debugger.js » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2006-2008 the V8 project authors. All rights reserved. 1 // Copyright 2006-2008 the V8 project authors. All rights reserved.
2 // Redistribution and use in source and binary forms, with or without 2 // Redistribution and use in source and binary forms, with or without
3 // modification, are permitted provided that the following conditions are 3 // modification, are permitted provided that the following conditions are
4 // met: 4 // met:
5 // 5 //
6 // * Redistributions of source code must retain the above copyright 6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer. 7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above 8 // * Redistributions in binary form must reproduce the above
9 // copyright notice, this list of conditions and the following 9 // copyright notice, this list of conditions and the following
10 // disclaimer in the documentation and/or other materials provided 10 // disclaimer in the documentation and/or other materials provided
(...skipping 725 matching lines...) Expand 10 before | Expand all | Expand 10 after
736 return this.fun === constructor; 736 return this.fun === constructor;
737 }; 737 };
738 738
739 function FormatEvalOrigin(script) { 739 function FormatEvalOrigin(script) {
740 var eval_origin = ""; 740 var eval_origin = "";
741 if (script.eval_from_function_name) { 741 if (script.eval_from_function_name) {
742 eval_origin += script.eval_from_function_name; 742 eval_origin += script.eval_from_function_name;
743 } else { 743 } else {
744 eval_origin += "<anonymous>"; 744 eval_origin += "<anonymous>";
745 } 745 }
746 746
747 var eval_from_script = script.eval_from_script; 747 var eval_from_script = script.eval_from_script;
748 if (eval_from_script) { 748 if (eval_from_script) {
749 if (eval_from_script.compilation_type == COMPILATION_TYPE_EVAL) { 749 if (eval_from_script.compilation_type == COMPILATION_TYPE_EVAL) {
750 // eval script originated from another eval. 750 // eval script originated from another eval.
751 eval_origin += " (eval at " + FormatEvalOrigin(eval_from_script) + ")"; 751 eval_origin += " (eval at " + FormatEvalOrigin(eval_from_script) + ")";
752 } else { 752 } else {
753 // eval script originated from "real" scource. 753 // eval script originated from "real" scource.
754 if (eval_from_script.name) { 754 if (eval_from_script.name) {
755 eval_origin += " (" + eval_from_script.name; 755 eval_origin += " (" + eval_from_script.name;
756 var location = eval_from_script.locationFromPosition(script.eval_from_sc ript_position, true); 756 var location = eval_from_script.locationFromPosition(script.eval_from_sc ript_position, true);
757 if (location) { 757 if (location) {
758 eval_origin += ":" + (location.line + 1); 758 eval_origin += ":" + (location.line + 1);
759 eval_origin += ":" + (location.column + 1); 759 eval_origin += ":" + (location.column + 1);
760 } 760 }
761 eval_origin += ")" 761 eval_origin += ")"
762 } else { 762 } else {
763 eval_origin += " (unknown source)"; 763 eval_origin += " (unknown source)";
764 } 764 }
765 } 765 }
766 } 766 }
767 767
768 return eval_origin; 768 return eval_origin;
769 }; 769 };
770 770
771 function FormatSourcePosition(frame) { 771 function FormatSourcePosition(frame) {
772 var fileLocation = ""; 772 var fileLocation = "";
773 if (frame.isNative()) { 773 if (frame.isNative()) {
774 fileLocation = "native"; 774 fileLocation = "native";
775 } else if (frame.isEval()) { 775 } else if (frame.isEval()) {
776 fileLocation = "eval at " + frame.getEvalOrigin(); 776 fileLocation = "eval at " + frame.getEvalOrigin();
777 } else { 777 } else {
(...skipping 163 matching lines...) Expand 10 before | Expand all | Expand 10 after
941 return this.name + ": " + FormatMessage({ type: type, args: this.arguments } ); 941 return this.name + ": " + FormatMessage({ type: type, args: this.arguments } );
942 } 942 }
943 var message = this.message; 943 var message = this.message;
944 return this.name + (message ? (": " + message) : ""); 944 return this.name + (message ? (": " + message) : "");
945 }, DONT_ENUM); 945 }, DONT_ENUM);
946 946
947 947
948 // Boilerplate for exceptions for stack overflows. Used from 948 // Boilerplate for exceptions for stack overflows. Used from
949 // Top::StackOverflow(). 949 // Top::StackOverflow().
950 const kStackOverflowBoilerplate = MakeRangeError('stack_overflow', []); 950 const kStackOverflowBoilerplate = MakeRangeError('stack_overflow', []);
OLDNEW
« no previous file with comments | « src/liveedit-debugger.js ('k') | src/mirror-debugger.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698