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

Side by Side Diff: src/v8.h

Issue 8937003: Implement callback when script finishes running in V8 API. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Fixed comments. Created 8 years, 11 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 | Annotate | Revision Log
« include/v8.h ('K') | « src/execution.cc ('k') | src/v8.cc » ('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 2011 the V8 project authors. All rights reserved. 1 // Copyright 2011 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 90 matching lines...) Expand 10 before | Expand all | Expand 10 after
101 // compilers for security. In order to prevent information leaks we 101 // compilers for security. In order to prevent information leaks we
102 // use a separate random state for internal random number 102 // use a separate random state for internal random number
103 // generation. 103 // generation.
104 static uint32_t RandomPrivate(Isolate* isolate); 104 static uint32_t RandomPrivate(Isolate* isolate);
105 static Object* FillHeapNumberWithRandom(Object* heap_number, 105 static Object* FillHeapNumberWithRandom(Object* heap_number,
106 Context* context); 106 Context* context);
107 107
108 // Idle notification directly from the API. 108 // Idle notification directly from the API.
109 static bool IdleNotification(int hint); 109 static bool IdleNotification(int hint);
110 110
111 static void AddCallCompletedCallback(CallCompletedCallback callback);
112 static void RemoveCallCompletedCallback(CallCompletedCallback callback);
113 static void FireCallCompletedCallback(Isolate* isolate);
114
111 private: 115 private:
112 static void InitializeOncePerProcess(); 116 static void InitializeOncePerProcess();
113 117
114 // True if engine is currently running 118 // True if engine is currently running
115 static bool is_running_; 119 static bool is_running_;
116 // True if V8 has ever been run 120 // True if V8 has ever been run
117 static bool has_been_setup_; 121 static bool has_been_setup_;
118 // True if error has been signaled for current engine 122 // True if error has been signaled for current engine
119 // (reset to false if engine is restarted) 123 // (reset to false if engine is restarted)
120 static bool has_fatal_error_; 124 static bool has_fatal_error_;
121 // True if engine has been shut down 125 // True if engine has been shut down
122 // (reset if engine is restarted) 126 // (reset if engine is restarted)
123 static bool has_been_disposed_; 127 static bool has_been_disposed_;
124 // True if we are using the crankshaft optimizing compiler. 128 // True if we are using the crankshaft optimizing compiler.
125 static bool use_crankshaft_; 129 static bool use_crankshaft_;
130 // List of callbacks when a call completes.
danno 2012/01/04 08:38:49 s/call/Call
131 static List<CallCompletedCallback>* call_completed_callbacks_;
126 }; 132 };
127 133
128 134
129 // JavaScript defines two kinds of 'nil'. 135 // JavaScript defines two kinds of 'nil'.
130 enum NilValue { kNullValue, kUndefinedValue }; 136 enum NilValue { kNullValue, kUndefinedValue };
131 137
132 138
133 // JavaScript defines two kinds of equality. 139 // JavaScript defines two kinds of equality.
134 enum EqualityKind { kStrictEquality, kNonStrictEquality }; 140 enum EqualityKind { kStrictEquality, kNonStrictEquality };
135 141
136 142
137 } } // namespace v8::internal 143 } } // namespace v8::internal
138 144
139 namespace i = v8::internal; 145 namespace i = v8::internal;
140 146
141 #endif // V8_V8_H_ 147 #endif // V8_V8_H_
OLDNEW
« include/v8.h ('K') | « src/execution.cc ('k') | src/v8.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698