| OLD | NEW |
| 1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 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 2635 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2646 | 2646 |
| 2647 bool V8EXPORT SetResourceConstraints(ResourceConstraints* constraints); | 2647 bool V8EXPORT SetResourceConstraints(ResourceConstraints* constraints); |
| 2648 | 2648 |
| 2649 | 2649 |
| 2650 // --- Exceptions --- | 2650 // --- Exceptions --- |
| 2651 | 2651 |
| 2652 | 2652 |
| 2653 typedef void (*FatalErrorCallback)(const char* location, const char* message); | 2653 typedef void (*FatalErrorCallback)(const char* location, const char* message); |
| 2654 | 2654 |
| 2655 | 2655 |
| 2656 typedef void (*MessageCallback)(Handle<Message> message, Handle<Value> data); | 2656 typedef void (*MessageCallback)(Handle<Message> message, Handle<Value> error); |
| 2657 | 2657 |
| 2658 | 2658 |
| 2659 /** | 2659 /** |
| 2660 * Schedules an exception to be thrown when returning to JavaScript. When an | 2660 * Schedules an exception to be thrown when returning to JavaScript. When an |
| 2661 * exception has been scheduled it is illegal to invoke any JavaScript | 2661 * exception has been scheduled it is illegal to invoke any JavaScript |
| 2662 * operation; the caller must return immediately and only after the exception | 2662 * operation; the caller must return immediately and only after the exception |
| 2663 * has been handled does it become legal to invoke JavaScript operations. | 2663 * has been handled does it become legal to invoke JavaScript operations. |
| 2664 */ | 2664 */ |
| 2665 Handle<Value> V8EXPORT ThrowException(Handle<Value> exception); | 2665 Handle<Value> V8EXPORT ThrowException(Handle<Value> exception); |
| 2666 | 2666 |
| (...skipping 411 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3078 static int GetCompressedStartupDataCount(); | 3078 static int GetCompressedStartupDataCount(); |
| 3079 static void GetCompressedStartupData(StartupData* compressed_data); | 3079 static void GetCompressedStartupData(StartupData* compressed_data); |
| 3080 static void SetDecompressedStartupData(StartupData* decompressed_data); | 3080 static void SetDecompressedStartupData(StartupData* decompressed_data); |
| 3081 | 3081 |
| 3082 /** | 3082 /** |
| 3083 * Adds a message listener. | 3083 * Adds a message listener. |
| 3084 * | 3084 * |
| 3085 * The same message listener can be added more than once and in that | 3085 * The same message listener can be added more than once and in that |
| 3086 * case it will be called more than once for each message. | 3086 * case it will be called more than once for each message. |
| 3087 */ | 3087 */ |
| 3088 static bool AddMessageListener(MessageCallback that, | 3088 static bool AddMessageListener(MessageCallback that); |
| 3089 Handle<Value> data = Handle<Value>()); | |
| 3090 | 3089 |
| 3091 /** | 3090 /** |
| 3092 * Remove all message listeners from the specified callback function. | 3091 * Remove all message listeners from the specified callback function. |
| 3093 */ | 3092 */ |
| 3094 static void RemoveMessageListeners(MessageCallback that); | 3093 static void RemoveMessageListeners(MessageCallback that); |
| 3095 | 3094 |
| 3096 /** | 3095 /** |
| 3097 * Tells V8 to capture current stack trace when uncaught exception occurs | 3096 * Tells V8 to capture current stack trace when uncaught exception occurs |
| 3098 * and report it to the message listeners. The option is off by default. | 3097 * and report it to the message listeners. The option is off by default. |
| 3099 */ | 3098 */ |
| (...skipping 1554 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4654 | 4653 |
| 4655 | 4654 |
| 4656 } // namespace v8 | 4655 } // namespace v8 |
| 4657 | 4656 |
| 4658 | 4657 |
| 4659 #undef V8EXPORT | 4658 #undef V8EXPORT |
| 4660 #undef TYPE_CHECK | 4659 #undef TYPE_CHECK |
| 4661 | 4660 |
| 4662 | 4661 |
| 4663 #endif // V8_H_ | 4662 #endif // V8_H_ |
| OLD | NEW |