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

Side by Side Diff: src/d8.h

Issue 1218553004: Change d8 Worker API so it takes a string instead of a function. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: use template strings Created 5 years, 5 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 | « no previous file | src/d8.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 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 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 #ifndef V8_D8_H_ 5 #ifndef V8_D8_H_
6 #define V8_D8_H_ 6 #define V8_D8_H_
7 7
8 #ifndef V8_SHARED 8 #ifndef V8_SHARED
9 #include "src/allocation.h" 9 #include "src/allocation.h"
10 #include "src/hashmap.h" 10 #include "src/hashmap.h"
(...skipping 221 matching lines...) Expand 10 before | Expand all | Expand 10 after
232 base::Mutex mutex_; 232 base::Mutex mutex_;
233 i::List<SerializationData*> data_; 233 i::List<SerializationData*> data_;
234 }; 234 };
235 235
236 236
237 class Worker { 237 class Worker {
238 public: 238 public:
239 Worker(); 239 Worker();
240 ~Worker(); 240 ~Worker();
241 241
242 void StartExecuteInThread(Isolate* isolate, const char* function_string); 242 void StartExecuteInThread(Isolate* isolate, const char* script);
243 void PostMessage(SerializationData* data); 243 void PostMessage(SerializationData* data);
244 SerializationData* GetMessage(); 244 SerializationData* GetMessage();
245 void Terminate(); 245 void Terminate();
246 246
247 private: 247 private:
248 class WorkerThread : public base::Thread { 248 class WorkerThread : public base::Thread {
249 public: 249 public:
250 explicit WorkerThread(Worker* worker) 250 explicit WorkerThread(Worker* worker)
251 : base::Thread(base::Thread::Options("WorkerThread")), 251 : base::Thread(base::Thread::Options("WorkerThread")),
252 worker_(worker) {} 252 worker_(worker) {}
(...skipping 225 matching lines...) Expand 10 before | Expand all | Expand 10 after
478 static void RunShell(Isolate* isolate); 478 static void RunShell(Isolate* isolate);
479 static bool SetOptions(int argc, char* argv[]); 479 static bool SetOptions(int argc, char* argv[]);
480 static Handle<ObjectTemplate> CreateGlobalTemplate(Isolate* isolate); 480 static Handle<ObjectTemplate> CreateGlobalTemplate(Isolate* isolate);
481 }; 481 };
482 482
483 483
484 } // namespace v8 484 } // namespace v8
485 485
486 486
487 #endif // V8_D8_H_ 487 #endif // V8_D8_H_
OLDNEW
« no previous file with comments | « no previous file | src/d8.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698