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

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

Issue 2480583003: [Binding] Expose a function as a static method of V8Initializer (Closed)
Patch Set: Make it a static method Created 4 years, 1 month 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 | « third_party/WebKit/Source/bindings/core/v8/V8Initializer.h ('k') | no next file » | 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 104 matching lines...) Expand 10 before | Expand all | Expand 10 after
115 const WrapperTypeInfo* type = toWrapperTypeInfo(obj); 115 const WrapperTypeInfo* type = toWrapperTypeInfo(obj);
116 if (V8DOMException::wrapperTypeInfo.isSubclass(type)) { 116 if (V8DOMException::wrapperTypeInfo.isSubclass(type)) {
117 DOMException* exception = V8DOMException::toImpl(obj); 117 DOMException* exception = V8DOMException::toImpl(obj);
118 if (exception && !exception->messageForConsole().isEmpty()) 118 if (exception && !exception->messageForConsole().isEmpty())
119 return exception->toStringForConsole(); 119 return exception->toStringForConsole();
120 } 120 }
121 } 121 }
122 return emptyString(); 122 return emptyString();
123 } 123 }
124 124
125 static void messageHandlerInMainThread(v8::Local<v8::Message> message, 125 void V8Initializer::messageHandlerInMainThread(v8::Local<v8::Message> message,
126 v8::Local<v8::Value> data) { 126 v8::Local<v8::Value> data) {
127 ASSERT(isMainThread()); 127 ASSERT(isMainThread());
128 v8::Isolate* isolate = v8::Isolate::GetCurrent(); 128 v8::Isolate* isolate = v8::Isolate::GetCurrent();
129 129
130 if (isolate->GetEnteredContext().IsEmpty()) 130 if (isolate->GetEnteredContext().IsEmpty())
131 return; 131 return;
132 132
133 // If called during context initialization, there will be no entered context. 133 // If called during context initialization, there will be no entered context.
134 ScriptState* scriptState = ScriptState::current(isolate); 134 ScriptState* scriptState = ScriptState::current(isolate);
135 if (!scriptState->contextIsValid()) 135 if (!scriptState->contextIsValid())
136 return; 136 return;
(...skipping 364 matching lines...) Expand 10 before | Expand all | Expand 10 after
501 isolate->AddMessageListener(messageHandlerInWorker); 501 isolate->AddMessageListener(messageHandlerInWorker);
502 isolate->SetFatalErrorHandler(reportFatalErrorInWorker); 502 isolate->SetFatalErrorHandler(reportFatalErrorInWorker);
503 503
504 uint32_t here; 504 uint32_t here;
505 isolate->SetStackLimit(reinterpret_cast<uintptr_t>( 505 isolate->SetStackLimit(reinterpret_cast<uintptr_t>(
506 &here - kWorkerMaxStackSize / sizeof(uint32_t*))); 506 &here - kWorkerMaxStackSize / sizeof(uint32_t*)));
507 isolate->SetPromiseRejectCallback(promiseRejectHandlerInWorker); 507 isolate->SetPromiseRejectCallback(promiseRejectHandlerInWorker);
508 } 508 }
509 509
510 } // namespace blink 510 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/bindings/core/v8/V8Initializer.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698