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

Side by Side Diff: third_party/WebKit/Source/modules/webdatabase/DatabaseContext.cpp

Issue 1477023003: Refactor the Heap into ThreadHeap to prepare for per thread heaps Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years 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) 2008 Apple Inc. All Rights Reserved. 2 * Copyright (C) 2008 Apple Inc. All Rights Reserved.
3 * Copyright (C) 2011 Google, Inc. All Rights Reserved. 3 * Copyright (C) 2011 Google, Inc. All Rights Reserved.
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions 6 * modification, are permitted provided that the following conditions
7 * are met: 7 * are met:
8 * 1. Redistributions of source code must retain the above copyright 8 * 1. 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 * 2. Redistributions in binary form must reproduce the above copyright 10 * 2. Redistributions in binary form must reproduce the above copyright
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after
94 DatabaseContext* self = new DatabaseContext(context); 94 DatabaseContext* self = new DatabaseContext(context);
95 DatabaseManager::manager().registerDatabaseContext(self); 95 DatabaseManager::manager().registerDatabaseContext(self);
96 return self; 96 return self;
97 } 97 }
98 98
99 DatabaseContext::DatabaseContext(ExecutionContext* context) 99 DatabaseContext::DatabaseContext(ExecutionContext* context)
100 : ActiveDOMObject(context) 100 : ActiveDOMObject(context)
101 , m_hasOpenDatabases(false) 101 , m_hasOpenDatabases(false)
102 , m_hasRequestedTermination(false) 102 , m_hasRequestedTermination(false)
103 { 103 {
104 ASSERT(isMainThread());
104 // ActiveDOMObject expects this to be called to set internal flags. 105 // ActiveDOMObject expects this to be called to set internal flags.
105 suspendIfNeeded(); 106 suspendIfNeeded();
106 107
107 // For debug accounting only. We must do this before we register the 108 // For debug accounting only. We must do this before we register the
108 // instance. The assertions assume this. 109 // instance. The assertions assume this.
109 DatabaseManager::manager().didConstructDatabaseContext(); 110 DatabaseManager::manager().didConstructDatabaseContext();
110 } 111 }
111 112
112 DatabaseContext::~DatabaseContext() 113 DatabaseContext::~DatabaseContext()
113 { 114 {
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after
198 { 199 {
199 return executionContext()->securityOrigin(); 200 return executionContext()->securityOrigin();
200 } 201 }
201 202
202 bool DatabaseContext::isContextThread() const 203 bool DatabaseContext::isContextThread() const
203 { 204 {
204 return executionContext()->isContextThread(); 205 return executionContext()->isContextThread();
205 } 206 }
206 207
207 } // namespace blink 208 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698