/* * Copyright (C) 1999-2001 Harri Porten (porten@kde.org) * Copyright (C) 2004-2011, 2013, 2016 Apple Inc. All rights reserved. * Copyright (C) 2007 Samuel Weinig * Copyright (C) 2013 Michael Pruett * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ #include "root.h" #include "JSDOMWrapperCache.h" namespace WebCore { using namespace JSC; Structure* getCachedDOMStructure(const JSDOMGlobalObject& globalObject, const ClassInfo* classInfo) { return globalObject.structures().get(classInfo).get(); } Structure* cacheDOMStructure(JSDOMGlobalObject& globalObject, Structure* structure, const ClassInfo* classInfo) { auto addToStructures = [](JSDOMStructureMap& structures, JSDOMGlobalObject& globalObject, Structure* structure, const ClassInfo* classInfo) { ASSERT(!structures.contains(classInfo)); return structures.set(classInfo, WriteBarrier(globalObject.vm(), &globalObject, structure)).iterator->value.get(); }; if (globalObject.vm().heap.mutatorShouldBeFenced()) { Locker locker { globalObject.gcLock() }; return addToStructures(globalObject.structures(), globalObject, structure, classInfo); } return addToStructures(globalObject.structures(NoLockingNecessary), globalObject, structure, classInfo); } } // namespace WebCore lags'>cli-flags Unnamed repository; edit this file 'description' to name the repository.
aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2022-03-16Revert "Unlimited arguments in process.nextTick"Gravatar Jarred Sumner 1-38/+48
This reverts commit aff9d232b1e7dfbac5fa1b18631aba18ed5f27e7.
2022-03-16bun.lockbGravatar Jarred Sumner 3-0/+0
2022-03-16Update feature_flags.zigGravatar Jarred Sumner 1-0/+1
2022-03-16[bun.js] Bun.unsafe test should check the gcGravatar Jarred Sumner 1-4/+14
2022-03-16Update work_pool.zigGravatar Jarred Sumner 1-21/+28
2022-03-16Add a way to run serial tasks on a different threadGravatar Jarred Sumner 1-3/+65
2022-03-16fix crash when SyntaxError is thrown and we did not receive an ErrorInstance?Gravatar Jarred Sumner 1-18/+25
2022-03-16[bun.js] Fix release-mode test failures in HeadersGravatar Jarred Sumner 1-47/+42
2022-03-16Update ref_count.zigGravatar Jarred Sumner 1-2/+0
2022-03-15file is too bigjarred/replGravatar Jarred Sumner 1-113827/+0
2022-03-15Update Dockerfile.baseGravatar Jarred Sumner 1-1/+1
2022-03-15Add rust and lolhtml to dockerfileGravatar Jarred Sumner 2-0/+20
2022-03-15bump webkitGravatar Jarred Sumner 1-1/+1
2022-03-15Update WebKitGravatar Jarred Sumner 1-0/+0
2022-03-15:camera:Gravatar Jarred Sumner 60-799/+859
2022-03-15Fix test failureGravatar Jarred Sumner 1-15/+17
2022-03-15[bun:error] handle errors without a name or messageGravatar Jarred Sumner 1-6/+11
2022-03-15Update pool.zigGravatar Jarred Sumner 1-0/+1
2022-03-15Load .env by defaultGravatar Jarred Sumner 2-0/+8
2022-03-15mimalloc interpose is buggyGravatar Jarred Sumner 1-2/+25
2022-03-15higher max http requests for bun.jsGravatar Jarred Sumner 1-0/+29
2022-03-15zero copyGravatar Jarred Sumner 1-21/+15
2022-03-15Update javascript.zigGravatar Jarred Sumner 1-2/+0
2022-03-15[bun.js] utf8 console.{time, count, timeEnd, profile, profileEnd, count, ↵Gravatar Jarred Sumner 1-16/+16
countReset}