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

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

Issue 2907543002: Removed use of RefPtr::Release where result is not used. (Closed)
Patch Set: fixed typo Created 3 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 | third_party/WebKit/Source/platform/wtf/RefPtr.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, 2012 Google Inc. All rights reserved. 2 * Copyright (C) 2009, 2012 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 are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after
107 world_ = 107 world_ =
108 DOMWrapperWorld::Create(isolate, DOMWrapperWorld::WorldType::kWorker); 108 DOMWrapperWorld::Create(isolate, DOMWrapperWorld::WorldType::kWorker);
109 } 109 }
110 110
111 WorkerOrWorkletScriptController::~WorkerOrWorkletScriptController() { 111 WorkerOrWorkletScriptController::~WorkerOrWorkletScriptController() {
112 DCHECK(!rejected_promises_); 112 DCHECK(!rejected_promises_);
113 } 113 }
114 114
115 void WorkerOrWorkletScriptController::Dispose() { 115 void WorkerOrWorkletScriptController::Dispose() {
116 rejected_promises_->Dispose(); 116 rejected_promises_->Dispose();
117 rejected_promises_.Release(); 117 rejected_promises_ = nullptr;
118 118
119 world_->Dispose(); 119 world_->Dispose();
120 120
121 DisposeContextIfNeeded(); 121 DisposeContextIfNeeded();
122 } 122 }
123 123
124 void WorkerOrWorkletScriptController::DisposeContextIfNeeded() { 124 void WorkerOrWorkletScriptController::DisposeContextIfNeeded() {
125 if (!IsContextInitialized()) 125 if (!IsContextInitialized())
126 return; 126 return;
127 127
(...skipping 232 matching lines...) Expand 10 before | Expand all | Expand 10 after
360 execution_state_->error_event_from_imported_script_ = error_event; 360 execution_state_->error_event_from_imported_script_ = error_event;
361 exception_state.RethrowV8Exception( 361 exception_state.RethrowV8Exception(
362 V8ThrowException::CreateError(isolate_, error_message)); 362 V8ThrowException::CreateError(isolate_, error_message));
363 } 363 }
364 364
365 DEFINE_TRACE(WorkerOrWorkletScriptController) { 365 DEFINE_TRACE(WorkerOrWorkletScriptController) {
366 visitor->Trace(global_scope_); 366 visitor->Trace(global_scope_);
367 } 367 }
368 368
369 } // namespace blink 369 } // namespace blink
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/Source/platform/wtf/RefPtr.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698