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

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

Issue 1726903002: Rename WorkerOrWorkletGlobalScope::script() to scriptController() (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 4 years, 9 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 267 matching lines...) Expand 10 before | Expand all | Expand 10 after
278 v8::Isolate* isolate = promise->GetIsolate(); 278 v8::Isolate* isolate = promise->GetIsolate();
279 ScriptState* scriptState = ScriptState::current(isolate); 279 ScriptState* scriptState = ScriptState::current(isolate);
280 if (!scriptState->contextIsValid()) 280 if (!scriptState->contextIsValid())
281 return; 281 return;
282 282
283 ExecutionContext* executionContext = scriptState->executionContext(); 283 ExecutionContext* executionContext = scriptState->executionContext();
284 if (!executionContext) 284 if (!executionContext)
285 return; 285 return;
286 286
287 ASSERT(executionContext->isWorkerGlobalScope()); 287 ASSERT(executionContext->isWorkerGlobalScope());
288 WorkerOrWorkletScriptController* scriptController = toWorkerGlobalScope(exec utionContext)->script(); 288 WorkerOrWorkletScriptController* scriptController = toWorkerGlobalScope(exec utionContext)->scriptController();
289 ASSERT(scriptController); 289 ASSERT(scriptController);
290 290
291 promiseRejectHandler(data, *scriptController->rejectedPromises(), String()); 291 promiseRejectHandler(data, *scriptController->rejectedPromises(), String());
292 } 292 }
293 293
294 static void failedAccessCheckCallbackInMainThread(v8::Local<v8::Object> host, v8 ::AccessType type, v8::Local<v8::Value> data) 294 static void failedAccessCheckCallbackInMainThread(v8::Local<v8::Object> host, v8 ::AccessType type, v8::Local<v8::Value> data)
295 { 295 {
296 v8::Isolate* isolate = v8::Isolate::GetCurrent(); 296 v8::Isolate* isolate = v8::Isolate::GetCurrent();
297 Frame* target = findFrame(isolate, host, data); 297 Frame* target = findFrame(isolate, host, data);
298 if (!target) 298 if (!target)
(...skipping 140 matching lines...) Expand 10 before | Expand all | Expand 10 after
439 439
440 isolate->AddMessageListener(messageHandlerInWorker); 440 isolate->AddMessageListener(messageHandlerInWorker);
441 isolate->SetFatalErrorHandler(reportFatalErrorInWorker); 441 isolate->SetFatalErrorHandler(reportFatalErrorInWorker);
442 442
443 uint32_t here; 443 uint32_t here;
444 isolate->SetStackLimit(reinterpret_cast<uintptr_t>(&here - kWorkerMaxStackSi ze / sizeof(uint32_t*))); 444 isolate->SetStackLimit(reinterpret_cast<uintptr_t>(&here - kWorkerMaxStackSi ze / sizeof(uint32_t*)));
445 isolate->SetPromiseRejectCallback(promiseRejectHandlerInWorker); 445 isolate->SetPromiseRejectCallback(promiseRejectHandlerInWorker);
446 } 446 }
447 447
448 } // namespace blink 448 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698