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

Side by Side Diff: src/d8.cc

Issue 1219563002: Fix cluster-fuzz found regression in d8 Workers. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: add regression test Created 5 years, 6 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 | test/mjsunit/regress/regress-crbug-504727.js » ('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 5
6 // Defined when linking against shared lib on Windows. 6 // Defined when linking against shared lib on Windows.
7 #if defined(USING_V8_SHARED) && !defined(V8_SHARED) 7 #if defined(USING_V8_SHARED) && !defined(V8_SHARED)
8 #define V8_SHARED 8 #define V8_SHARED
9 #endif 9 #endif
10 10
(...skipping 1688 matching lines...) Expand 10 before | Expand all | Expand 10 after
1699 Handle<Function> postmessage_fun; 1699 Handle<Function> postmessage_fun;
1700 if (postmessage_fun_template->GetFunction(context) 1700 if (postmessage_fun_template->GetFunction(context)
1701 .ToLocal(&postmessage_fun)) { 1701 .ToLocal(&postmessage_fun)) {
1702 global->Set(String::NewFromUtf8(isolate, "postMessage"), 1702 global->Set(String::NewFromUtf8(isolate, "postMessage"),
1703 postmessage_fun); 1703 postmessage_fun);
1704 } 1704 }
1705 1705
1706 // First run the script 1706 // First run the script
1707 Handle<String> file_name = String::NewFromUtf8(isolate, "unnamed"); 1707 Handle<String> file_name = String::NewFromUtf8(isolate, "unnamed");
1708 Handle<String> source = String::NewFromUtf8(isolate, script_); 1708 Handle<String> source = String::NewFromUtf8(isolate, script_);
1709 if (Shell::ExecuteString(isolate, source, file_name, true, true)) { 1709 if (Shell::ExecuteString(isolate, source, file_name, false, true)) {
1710 // Get the message handler 1710 // Get the message handler
1711 Handle<Value> onmessage = 1711 Handle<Value> onmessage =
1712 global->Get(String::NewFromUtf8(isolate, "onmessage")); 1712 global->Get(String::NewFromUtf8(isolate, "onmessage"));
1713 if (onmessage->IsFunction()) { 1713 if (onmessage->IsFunction()) {
1714 Handle<Function> onmessage_fun = Handle<Function>::Cast(onmessage); 1714 Handle<Function> onmessage_fun = Handle<Function>::Cast(onmessage);
1715 // Now wait for messages 1715 // Now wait for messages
1716 bool done = false; 1716 bool done = false;
1717 while (!done) { 1717 while (!done) {
1718 in_semaphore_.Wait(); 1718 in_semaphore_.Wait();
1719 SerializationData* data; 1719 SerializationData* data;
(...skipping 708 matching lines...) Expand 10 before | Expand all | Expand 10 after
2428 } 2428 }
2429 2429
2430 } // namespace v8 2430 } // namespace v8
2431 2431
2432 2432
2433 #ifndef GOOGLE3 2433 #ifndef GOOGLE3
2434 int main(int argc, char* argv[]) { 2434 int main(int argc, char* argv[]) {
2435 return v8::Shell::Main(argc, argv); 2435 return v8::Shell::Main(argc, argv);
2436 } 2436 }
2437 #endif 2437 #endif
OLDNEW
« no previous file with comments | « no previous file | test/mjsunit/regress/regress-crbug-504727.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698