Ignore:
Timestamp:
Dec 1, 2017, 5:12:48 PM (8 years ago)
Author:
[email protected]
Message:

Let's scramble ClassInfo pointers in cells.
https://bugs.webkit.org/show_bug.cgi?id=180291
<rdar://problem/35807620>

Reviewed by JF Bastien.

Source/JavaScriptCore:

  • API/JSCallbackObject.h:
  • API/JSObjectRef.cpp:

(classInfoPrivate):

  • JavaScriptCore.xcodeproj/project.pbxproj:
  • Sources.txt:
  • assembler/MacroAssemblerCodeRef.cpp:

(JSC::MacroAssemblerCodePtr::initialize): Deleted.

  • assembler/MacroAssemblerCodeRef.h:

(JSC::MacroAssemblerCodePtr:: const):
(JSC::MacroAssemblerCodePtr::hash const):

  • dfg/DFGSpeculativeJIT.cpp:

(JSC::DFG::SpeculativeJIT::checkArray):
(JSC::DFG::SpeculativeJIT::compileCheckSubClass):
(JSC::DFG::SpeculativeJIT::compileNewStringObject):

  • ftl/FTLLowerDFGToB3.cpp:

(JSC::FTL::DFG::LowerDFGToB3::compileNewStringObject):
(JSC::FTL::DFG::LowerDFGToB3::compileCheckSubClass):

  • jit/AssemblyHelpers.h:

(JSC::AssemblyHelpers::emitAllocateDestructibleObject):

  • jit/SpecializedThunkJIT.h:

(JSC::SpecializedThunkJIT::loadArgumentWithSpecificClass):

  • runtime/InitializeThreading.cpp:

(JSC::initializeThreading):

  • runtime/JSCScrambledPtr.cpp: Added.

(JSC::initializeScrambledPtrKeys):

  • runtime/JSCScrambledPtr.h: Added.
  • runtime/JSDestructibleObject.h:

(JSC::JSDestructibleObject::classInfo const):

  • runtime/JSSegmentedVariableObject.h:

(JSC::JSSegmentedVariableObject::classInfo const):

  • runtime/Structure.h:
  • runtime/VM.h:

Source/WTF:

  • wtf/ScrambledPtr.h:

(WTF::ScrambledPtr::descrambled const):
(WTF::ScrambledPtr::bits const):
(WTF::ScrambledPtr::operator==):
(WTF::ScrambledPtr::operator=):
(WTF::ScrambledPtr::scramble):
(WTF::ScrambledPtr::descramble):
(WTF::ScrambledPtr:: const): Deleted.
(WTF::ScrambledPtr::scrambledBits const): Deleted.

File:
1 edited

Legend:

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

    r221822 r225437  
    2828#define JSCallbackObject_h
    2929
     30#include "JSCScrambledPtr.h"
    3031#include "JSObjectRef.h"
    3132#include "JSValueRef.h"
     
    234235
    235236    std::unique_ptr<JSCallbackObjectData> m_callbackObjectData;
    236     const ClassInfo* m_classInfo;
     237    ClassInfoScrambledPtr m_classInfo;
    237238};
    238239
Note: See TracChangeset for help on using the changeset viewer.