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

Side by Side Diff: third_party/WebKit/Source/bindings/core/v8/V8Initializer.cpp

Issue 2668903003: Replace WTF::emptyString{16Bit}() with a static global (Closed)
Patch Set: Replace WTF::emptyString{16Bit}() with a static global Created 3 years, 10 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 | third_party/WebKit/Source/bindings/core/v8/V8StringResource.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 98 matching lines...) Expand 10 before | Expand all | Expand 10 after
109 v8::Local<v8::Value> data) { 109 v8::Local<v8::Value> data) {
110 if (V8DOMWrapper::isWrapper(isolate, data)) { 110 if (V8DOMWrapper::isWrapper(isolate, data)) {
111 v8::Local<v8::Object> obj = v8::Local<v8::Object>::Cast(data); 111 v8::Local<v8::Object> obj = v8::Local<v8::Object>::Cast(data);
112 const WrapperTypeInfo* type = toWrapperTypeInfo(obj); 112 const WrapperTypeInfo* type = toWrapperTypeInfo(obj);
113 if (V8DOMException::wrapperTypeInfo.isSubclass(type)) { 113 if (V8DOMException::wrapperTypeInfo.isSubclass(type)) {
114 DOMException* exception = V8DOMException::toImpl(obj); 114 DOMException* exception = V8DOMException::toImpl(obj);
115 if (exception && !exception->messageForConsole().isEmpty()) 115 if (exception && !exception->messageForConsole().isEmpty())
116 return exception->toStringForConsole(); 116 return exception->toStringForConsole();
117 } 117 }
118 } 118 }
119 return emptyString(); 119 return emptyString;
120 } 120 }
121 121
122 namespace { 122 namespace {
123 MessageLevel MessageLevelFromNonFatalErrorLevel(int errorLevel) { 123 MessageLevel MessageLevelFromNonFatalErrorLevel(int errorLevel) {
124 MessageLevel level = ErrorMessageLevel; 124 MessageLevel level = ErrorMessageLevel;
125 switch (errorLevel) { 125 switch (errorLevel) {
126 case v8::Isolate::kMessageDebug: 126 case v8::Isolate::kMessageDebug:
127 level = VerboseMessageLevel; 127 level = VerboseMessageLevel;
128 break; 128 break;
129 case v8::Isolate::kMessageLog: 129 case v8::Isolate::kMessageLog:
(...skipping 390 matching lines...) Expand 10 before | Expand all | Expand 10 after
520 v8::Isolate::kMessageLog); 520 v8::Isolate::kMessageLog);
521 isolate->SetFatalErrorHandler(reportFatalErrorInWorker); 521 isolate->SetFatalErrorHandler(reportFatalErrorInWorker);
522 522
523 uint32_t here; 523 uint32_t here;
524 isolate->SetStackLimit(reinterpret_cast<uintptr_t>(&here) - 524 isolate->SetStackLimit(reinterpret_cast<uintptr_t>(&here) -
525 kWorkerMaxStackSize); 525 kWorkerMaxStackSize);
526 isolate->SetPromiseRejectCallback(promiseRejectHandlerInWorker); 526 isolate->SetPromiseRejectCallback(promiseRejectHandlerInWorker);
527 } 527 }
528 528
529 } // namespace blink 529 } // namespace blink
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/Source/bindings/core/v8/V8StringResource.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698