OLD | NEW |
1 // Copyright 2013 the V8 project authors. All rights reserved. | 1 // Copyright 2013 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 1049 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1060 return NewError("$SyntaxError", message); | 1060 return NewError("$SyntaxError", message); |
1061 } | 1061 } |
1062 | 1062 |
1063 | 1063 |
1064 Handle<Object> Factory::NewReferenceError(const char* message, | 1064 Handle<Object> Factory::NewReferenceError(const char* message, |
1065 Vector< Handle<Object> > args) { | 1065 Vector< Handle<Object> > args) { |
1066 return NewError("MakeReferenceError", message, args); | 1066 return NewError("MakeReferenceError", message, args); |
1067 } | 1067 } |
1068 | 1068 |
1069 | 1069 |
| 1070 Handle<Object> Factory::NewReferenceError(const char* message, |
| 1071 Handle<JSArray> args) { |
| 1072 return NewError("MakeReferenceError", message, args); |
| 1073 } |
| 1074 |
| 1075 |
1070 Handle<Object> Factory::NewReferenceError(Handle<String> message) { | 1076 Handle<Object> Factory::NewReferenceError(Handle<String> message) { |
1071 return NewError("$ReferenceError", message); | 1077 return NewError("$ReferenceError", message); |
1072 } | 1078 } |
1073 | 1079 |
1074 | 1080 |
1075 Handle<Object> Factory::NewError(const char* maker, | 1081 Handle<Object> Factory::NewError(const char* maker, |
1076 const char* message, | 1082 const char* message, |
1077 Vector< Handle<Object> > args) { | 1083 Vector< Handle<Object> > args) { |
1078 // Instantiate a closeable HandleScope for EscapeFrom. | 1084 // Instantiate a closeable HandleScope for EscapeFrom. |
1079 v8::EscapableHandleScope scope(reinterpret_cast<v8::Isolate*>(isolate())); | 1085 v8::EscapableHandleScope scope(reinterpret_cast<v8::Isolate*>(isolate())); |
(...skipping 911 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1991 return Handle<Object>::null(); | 1997 return Handle<Object>::null(); |
1992 } | 1998 } |
1993 | 1999 |
1994 | 2000 |
1995 Handle<Object> Factory::ToBoolean(bool value) { | 2001 Handle<Object> Factory::ToBoolean(bool value) { |
1996 return value ? true_value() : false_value(); | 2002 return value ? true_value() : false_value(); |
1997 } | 2003 } |
1998 | 2004 |
1999 | 2005 |
2000 } } // namespace v8::internal | 2006 } } // namespace v8::internal |
OLD | NEW |