Ignore:
Timestamp:
Jan 6, 2017, 3:38:31 PM (8 years ago)
Author:
[email protected]
Message:

The ObjC API's JSVirtualMachine's map tables need to be guarded by a lock.
https://bugs.webkit.org/show_bug.cgi?id=166778
<rdar://problem/29761198>

Reviewed by Filip Pizlo.

Now that we have a concurrent GC, access to JSVirtualMachine's
m_externalObjectGraph and m_externalRememberedSet need to be guarded by a lock
since both the GC marker thread and the mutator thread may access them at the
same time.

  • API/JSVirtualMachine.mm:

(-[JSVirtualMachine addExternalRememberedObject:]):
(-[JSVirtualMachine addManagedReference:withOwner:]):
(-[JSVirtualMachine removeManagedReference:withOwner:]):
(-[JSVirtualMachine externalDataMutex]):
(scanExternalObjectGraph):
(scanExternalRememberedSet):

  • API/JSVirtualMachineInternal.h:
  • Deleted externalObjectGraph method. There's no need to expose this.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/JavaScriptCore/API/JSVirtualMachineInternal.h

    r174110 r210458  
    11/*
    2  * Copyright (C) 2013 Apple Inc. All rights reserved.
     2 * Copyright (C) 2013, 2017 Apple Inc. All rights reserved.
    33 *
    44 * Redistribution and use in source and binary forms, with or without
     
    4848- (void)addContext:(JSContext *)wrapper forGlobalContextRef:(JSGlobalContextRef)globalContext;
    4949
    50 - (NSMapTable *)externalObjectGraph;
    51 
    5250@end
    5351#endif // defined(__OBJC__)
Note: See TracChangeset for help on using the changeset viewer.