| OLD | NEW |
| 1 // Copyright 2006-2008 the V8 project authors. All rights reserved. | 1 // Copyright 2006-2008 the V8 project authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 // The infrastructure used for (localized) message reporting in V8. | 5 // The infrastructure used for (localized) message reporting in V8. |
| 6 // | 6 // |
| 7 // Note: there's a big unresolved issue about ownership of the data | 7 // Note: there's a big unresolved issue about ownership of the data |
| 8 // structures used by this framework. | 8 // structures used by this framework. |
| 9 | 9 |
| 10 #ifndef V8_MESSAGES_H_ | 10 #ifndef V8_MESSAGES_H_ |
| (...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 64 | 64 |
| 65 bool IsValid() { return !fun_.is_null(); } | 65 bool IsValid() { return !fun_.is_null(); } |
| 66 | 66 |
| 67 private: | 67 private: |
| 68 Isolate* isolate_; | 68 Isolate* isolate_; |
| 69 Handle<Object> receiver_; | 69 Handle<Object> receiver_; |
| 70 Handle<JSFunction> fun_; | 70 Handle<JSFunction> fun_; |
| 71 int32_t pos_; | 71 int32_t pos_; |
| 72 }; | 72 }; |
| 73 | 73 |
| 74 |
| 74 #define MESSAGE_TEMPLATES(T) \ | 75 #define MESSAGE_TEMPLATES(T) \ |
| 75 /* Error */ \ | 76 /* Error */ \ |
| 76 T(None, "") \ | 77 T(None, "") \ |
| 77 T(CyclicProto, "Cyclic __proto__ value") \ | 78 T(CyclicProto, "Cyclic __proto__ value") \ |
| 78 T(Debugger, "Debugger: %") \ | 79 T(Debugger, "Debugger: %") \ |
| 79 T(DebuggerLoading, "Error loading debugger") \ | 80 T(DebuggerLoading, "Error loading debugger") \ |
| 80 T(DefaultOptionsMissing, "Internal % error. Default options are missing.") \ | 81 T(DefaultOptionsMissing, "Internal % error. Default options are missing.") \ |
| 81 T(UncaughtException, "Uncaught %") \ | 82 T(UncaughtException, "Uncaught %") \ |
| 82 T(Unsupported, "Not supported") \ | 83 T(Unsupported, "Not supported") \ |
| 83 T(WrongServiceType, "Internal error, wrong service type: %") \ | 84 T(WrongServiceType, "Internal error, wrong service type: %") \ |
| (...skipping 474 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 558 static Handle<String> GetMessage(Isolate* isolate, Handle<Object> data); | 559 static Handle<String> GetMessage(Isolate* isolate, Handle<Object> data); |
| 559 static base::SmartArrayPointer<char> GetLocalizedMessage(Isolate* isolate, | 560 static base::SmartArrayPointer<char> GetLocalizedMessage(Isolate* isolate, |
| 560 Handle<Object> data); | 561 Handle<Object> data); |
| 561 }; | 562 }; |
| 562 | 563 |
| 563 | 564 |
| 564 } // namespace internal | 565 } // namespace internal |
| 565 } // namespace v8 | 566 } // namespace v8 |
| 566 | 567 |
| 567 #endif // V8_MESSAGES_H_ | 568 #endif // V8_MESSAGES_H_ |
| OLD | NEW |