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

Side by Side Diff: Source/bindings/v8/V8Initializer.cpp

Issue 13575004: Apply script preprocessor to Web page scripts only. (Closed) Base URL: https://chromium.googlesource.com/external/WebKit_trimmed.git@master
Patch Set: Rebase, simplify Created 7 years, 8 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
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2009 Google Inc. All rights reserved. 2 * Copyright (C) 2009 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 1. Redistributions of source code must retain the above copyright 7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer. 8 * notice, this list of conditions and the following disclaimer.
9 * 2. Redistributions in binary form must reproduce the above copyright 9 * 2. Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the 10 * notice, this list of conditions and the following disclaimer in the
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
64 return V8Location::toNative(host)->frame(); 64 return V8Location::toNative(host)->frame();
65 65
66 // This function can handle only those types listed above. 66 // This function can handle only those types listed above.
67 ASSERT_NOT_REACHED(); 67 ASSERT_NOT_REACHED();
68 return 0; 68 return 0;
69 } 69 }
70 70
71 static void reportFatalErrorInMainThread(const char* location, const char* messa ge) 71 static void reportFatalErrorInMainThread(const char* location, const char* messa ge)
72 { 72 {
73 int memoryUsageMB = MemoryUsageSupport::actualMemoryUsageMB(); 73 int memoryUsageMB = MemoryUsageSupport::actualMemoryUsageMB();
74 printf("V8 error: %s (%s). Current memory usage: %d MB\n", message, locatio n, memoryUsageMB); 74 fprintf(stderr, "V8 error: %s (%s). Current memory usage: %d MB\n", message , location, memoryUsageMB);
75 CRASH(); 75 CRASH();
76 } 76 }
77 77
78 static void messageHandlerInMainThread(v8::Handle<v8::Message> message, v8::Hand le<v8::Value> data) 78 static void messageHandlerInMainThread(v8::Handle<v8::Message> message, v8::Hand le<v8::Value> data)
79 { 79 {
80 DOMWindow* firstWindow = firstDOMWindow(BindingState::instance()); 80 DOMWindow* firstWindow = firstDOMWindow(BindingState::instance());
81 if (!firstWindow->isCurrentlyDisplayedInFrame()) 81 if (!firstWindow->isCurrentlyDisplayedInFrame())
82 return; 82 return;
83 83
84 String errorMessage = toWebCoreString(message->Get()); 84 String errorMessage = toWebCoreString(message->Get());
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after
168 168
169 v8::ResourceConstraints resourceConstraints; 169 v8::ResourceConstraints resourceConstraints;
170 uint32_t here; 170 uint32_t here;
171 resourceConstraints.set_stack_limit(&here - kWorkerMaxStackSize / sizeof(uin t32_t*)); 171 resourceConstraints.set_stack_limit(&here - kWorkerMaxStackSize / sizeof(uin t32_t*));
172 v8::SetResourceConstraints(&resourceConstraints); 172 v8::SetResourceConstraints(&resourceConstraints);
173 173
174 V8PerIsolateData::ensureInitialized(isolate); 174 V8PerIsolateData::ensureInitialized(isolate);
175 } 175 }
176 176
177 } // namespace WebCore 177 } // namespace WebCore
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698