Skip to content

Commit ee89c22

Browse files
7604.5.6
1 parent 1206fd9 commit ee89c22

File tree

117 files changed

+2462
-365
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

117 files changed

+2462
-365
lines changed

API/JSCallbackFunction.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (C) 2006, 2008 Apple Inc. All rights reserved.
2+
* Copyright (C) 2006-2017 Apple Inc. All rights reserved.
33
*
44
* Redistribution and use in source and binary forms, with or without
55
* modification, are permitted provided that the following conditions
@@ -53,9 +53,9 @@ class JSCallbackFunction : public InternalFunction {
5353

5454
static CallType getCallData(JSCell*, CallData&);
5555

56-
JSObjectCallAsFunctionCallback functionCallback() { return m_callback; }
56+
JSObjectCallAsFunctionCallback functionCallback() { return m_callback.unpoisoned(); }
5757

58-
JSObjectCallAsFunctionCallback m_callback;
58+
Poisoned<g_nativeCodePoison, JSObjectCallAsFunctionCallback> m_callback;
5959
};
6060

6161
} // namespace JSC

API/JSCallbackObject.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@
2727
#ifndef JSCallbackObject_h
2828
#define JSCallbackObject_h
2929

30+
#include "JSCPoisonedPtr.h"
3031
#include "JSObjectRef.h"
3132
#include "JSValueRef.h"
3233
#include "JSObject.h"
@@ -232,7 +233,7 @@ class JSCallbackObject : public Parent {
232233
static EncodedJSValue callbackGetter(ExecState*, EncodedJSValue, PropertyName);
233234

234235
std::unique_ptr<JSCallbackObjectData> m_callbackObjectData;
235-
const ClassInfo* m_classInfo;
236+
PoisonedClassInfoPtr m_classInfo;
236237
};
237238

238239
} // namespace JSC

API/JSObjectRef.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -392,7 +392,7 @@ static const ClassInfo* classInfoPrivate(JSObject* jsObject)
392392
if (vm.currentlyDestructingCallbackObject != jsObject)
393393
return jsObject->classInfo(vm);
394394

395-
return vm.currentlyDestructingCallbackObjectClassInfo;
395+
return vm.currentlyDestructingCallbackObjectClassInfo.unpoisoned();
396396
}
397397

398398
void* JSObjectGetPrivate(JSObjectRef object)

ChangeLog

Lines changed: 1363 additions & 0 deletions
Large diffs are not rendered by default.

Configurations/Version.xcconfig

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,8 @@
2222
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
2323

2424
MAJOR_VERSION = 604;
25-
MINOR_VERSION = 3;
26-
TINY_VERSION = 5;
25+
MINOR_VERSION = 5;
26+
TINY_VERSION = 6;
2727
MICRO_VERSION = 0;
2828
NANO_VERSION = 0;
2929
FULL_VERSION = $(MAJOR_VERSION).$(MINOR_VERSION).$(TINY_VERSION);

JavaScriptCore.xcodeproj/project.pbxproj

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2411,6 +2411,7 @@
24112411
E49DC16C12EF294E00184A1F /* SourceProviderCache.h in Headers */ = {isa = PBXBuildFile; fileRef = E49DC15112EF272200184A1F /* SourceProviderCache.h */; settings = {ATTRIBUTES = (Private, ); }; };
24122412
E49DC16D12EF295300184A1F /* SourceProviderCacheItem.h in Headers */ = {isa = PBXBuildFile; fileRef = E49DC14912EF261A00184A1F /* SourceProviderCacheItem.h */; settings = {ATTRIBUTES = (Private, ); }; };
24132413
FA3AB211C8494524AB390267 /* JSSourceCode.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F73926918DC64330AFCDF0D7 /* JSSourceCode.cpp */; };
2414+
FE05FB0A1FE8EF5800093230 /* JSCPoisonedPtr.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FE2B0B681FD0D2970075DA5F /* JSCPoisonedPtr.cpp */; };
24142415
FE0D4A061AB8DD0A002F54BF /* ExecutionTimeLimitTest.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FE0D4A041AB8DD0A002F54BF /* ExecutionTimeLimitTest.cpp */; };
24152416
FE0D4A091ABA2437002F54BF /* GlobalContextWithFinalizerTest.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FE0D4A071ABA2437002F54BF /* GlobalContextWithFinalizerTest.cpp */; };
24162417
FE1220271BE7F58C0039E6F2 /* JITAddGenerator.h in Headers */ = {isa = PBXBuildFile; fileRef = FE1220261BE7F5640039E6F2 /* JITAddGenerator.h */; };
@@ -2430,6 +2431,8 @@
24302431
FE20CE9D15F04A9500DF3430 /* LLIntCLoop.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FE20CE9B15F04A9500DF3430 /* LLIntCLoop.cpp */; };
24312432
FE20CE9E15F04A9500DF3430 /* LLIntCLoop.h in Headers */ = {isa = PBXBuildFile; fileRef = FE20CE9C15F04A9500DF3430 /* LLIntCLoop.h */; settings = {ATTRIBUTES = (Private, ); }; };
24322433
FE2A87601F02381600EB31B2 /* MinimumReservedZoneSize.h in Headers */ = {isa = PBXBuildFile; fileRef = FE2A875F1F02381600EB31B2 /* MinimumReservedZoneSize.h */; };
2434+
FE2B0B691FD227E00075DA5F /* JSCPoisonedPtr.h in Headers */ = {isa = PBXBuildFile; fileRef = FE2B0B671FD0D2960075DA5F /* JSCPoisonedPtr.h */; settings = {ATTRIBUTES = (Private, ); }; };
2435+
FE2B0B731FD9EF700075DA5F /* JSCPoison.h in Headers */ = {isa = PBXBuildFile; fileRef = FE2B0B701FD8C4630075DA5F /* JSCPoison.h */; settings = {ATTRIBUTES = (Private, ); }; };
24332436
FE2E6A7B1D6EA62C0060F896 /* ThrowScope.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FE2E6A7A1D6EA5FE0060F896 /* ThrowScope.cpp */; };
24342437
FE3022D21E3D73A500BAC493 /* SigillCrashAnalyzer.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FE3022D01E3D739600BAC493 /* SigillCrashAnalyzer.cpp */; };
24352438
FE3022D31E3D73A500BAC493 /* SigillCrashAnalyzer.h in Headers */ = {isa = PBXBuildFile; fileRef = FE3022D11E3D739600BAC493 /* SigillCrashAnalyzer.h */; settings = {ATTRIBUTES = (Private, ); }; };
@@ -5081,6 +5084,9 @@
50815084
FE20CE9B15F04A9500DF3430 /* LLIntCLoop.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LLIntCLoop.cpp; path = llint/LLIntCLoop.cpp; sourceTree = "<group>"; };
50825085
FE20CE9C15F04A9500DF3430 /* LLIntCLoop.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = LLIntCLoop.h; path = llint/LLIntCLoop.h; sourceTree = "<group>"; };
50835086
FE2A875F1F02381600EB31B2 /* MinimumReservedZoneSize.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = MinimumReservedZoneSize.h; sourceTree = "<group>"; };
5087+
FE2B0B671FD0D2960075DA5F /* JSCPoisonedPtr.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSCPoisonedPtr.h; sourceTree = "<group>"; };
5088+
FE2B0B681FD0D2970075DA5F /* JSCPoisonedPtr.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSCPoisonedPtr.cpp; sourceTree = "<group>"; };
5089+
FE2B0B701FD8C4630075DA5F /* JSCPoison.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSCPoison.h; sourceTree = "<group>"; };
50845090
FE2E6A7A1D6EA5FE0060F896 /* ThrowScope.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ThrowScope.cpp; sourceTree = "<group>"; };
50855091
FE3022D01E3D739600BAC493 /* SigillCrashAnalyzer.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = SigillCrashAnalyzer.cpp; sourceTree = "<group>"; };
50865092
FE3022D11E3D739600BAC493 /* SigillCrashAnalyzer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SigillCrashAnalyzer.h; sourceTree = "<group>"; };
@@ -6756,6 +6762,9 @@
67566762
F692A8870255597D01FF60F7 /* JSCJSValue.cpp */,
67576763
14ABB36E099C076400E2A24F /* JSCJSValue.h */,
67586764
865A30F0135007E100CDB49E /* JSCJSValueInlines.h */,
6765+
FE2B0B701FD8C4630075DA5F /* JSCPoison.h */,
6766+
FE2B0B681FD0D2970075DA5F /* JSCPoisonedPtr.cpp */,
6767+
FE2B0B671FD0D2960075DA5F /* JSCPoisonedPtr.h */,
67596768
72AAF7CB1D0D318B005E60BE /* JSCustomGetterSetterFunction.cpp */,
67606769
72AAF7CC1D0D318B005E60BE /* JSCustomGetterSetterFunction.h */,
67616770
0F2B66BD17B6B5AB00A7AE3F /* JSDataView.cpp */,
@@ -8279,6 +8288,7 @@
82798288
0F338DFA1BE96AA80013C88F /* B3CCallValue.h in Headers */,
82808289
0F33FCFB1C1625BE00323F67 /* B3CFG.h in Headers */,
82818290
0FEC85061BDACDAC0080FF74 /* B3CheckSpecial.h in Headers */,
8291+
FE2B0B731FD9EF700075DA5F /* JSCPoison.h in Headers */,
82828292
0FEC85081BDACDAC0080FF74 /* B3CheckValue.h in Headers */,
82838293
0FEC850A1BDACDAC0080FF74 /* B3Common.h in Headers */,
82848294
0FEC850C1BDACDAC0080FF74 /* B3Commutativity.h in Headers */,
@@ -8329,6 +8339,7 @@
83298339
0FEC852A1BDACDAC0080FF74 /* B3PhaseScope.h in Headers */,
83308340
0F37308D1C0BD29100052BFA /* B3PhiChildren.h in Headers */,
83318341
0FEC852C1BDACDAC0080FF74 /* B3Procedure.h in Headers */,
8342+
FE2B0B691FD227E00075DA5F /* JSCPoisonedPtr.h in Headers */,
83328343
0FEC852D1BDACDAC0080FF74 /* B3ProcedureInlines.h in Headers */,
83338344
0F725CAA1C503DED00AD943A /* B3PureCSE.h in Headers */,
83348345
43422A671C16267800E2EB98 /* B3ReduceDoubleToFloat.h in Headers */,
@@ -10267,6 +10278,7 @@
1026710278
A5FD0079189B051000633231 /* ConsoleMessage.cpp in Sources */,
1026810279
A55714BF1CD804A40004D2C6 /* ConsoleObject.cpp in Sources */,
1026910280
0F978B3B1AAEA71D007C7369 /* ConstantMode.cpp in Sources */,
10281+
FE05FB0A1FE8EF5800093230 /* JSCPoisonedPtr.cpp in Sources */,
1027010282
1428082E107EC0570013E7B2 /* ConstructData.cpp in Sources */,
1027110283
A57D23F11891B5B40031C7FA /* ContentSearchUtilities.cpp in Sources */,
1027210284
52B717B51A0597E1007AF4F3 /* ControlFlowProfiler.cpp in Sources */,

assembler/AbstractMacroAssembler.h

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -825,7 +825,7 @@ class AbstractMacroAssembler : public AbstractMacroAssemblerBase {
825825

826826
static ptrdiff_t differenceBetweenCodePtr(const MacroAssemblerCodePtr& a, const MacroAssemblerCodePtr& b)
827827
{
828-
return reinterpret_cast<ptrdiff_t>(b.executableAddress()) - reinterpret_cast<ptrdiff_t>(a.executableAddress());
828+
return b.executableAddress<ptrdiff_t>() - a.executableAddress<ptrdiff_t>();
829829
}
830830

831831
unsigned debugOffset() { return m_assembler.debugOffset(); }
@@ -847,6 +847,11 @@ class AbstractMacroAssembler : public AbstractMacroAssemblerBase {
847847
AssemblerType::linkPointer(code, label, value);
848848
}
849849

850+
static void linkPointer(void* code, AssemblerLabel label, MacroAssemblerCodePtr value)
851+
{
852+
AssemblerType::linkPointer(code, label, value.executableAddress());
853+
}
854+
850855
static void* getLinkerAddress(void* code, AssemblerLabel label)
851856
{
852857
return AssemblerType::getRelocatedAddress(code, label);

assembler/CodeLocation.h

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (C) 2009 Apple Inc. All rights reserved.
2+
* Copyright (C) 2009-2017 Apple Inc. All rights reserved.
33
*
44
* Redistribution and use in source and binary forms, with or without
55
* modification, are permitted provided that the following conditions
@@ -164,55 +164,55 @@ class CodeLocationConvertibleLoad : public CodeLocationCommon {
164164
inline CodeLocationInstruction CodeLocationCommon::instructionAtOffset(int offset)
165165
{
166166
ASSERT_VALID_CODE_OFFSET(offset);
167-
return CodeLocationInstruction(reinterpret_cast<char*>(dataLocation()) + offset);
167+
return CodeLocationInstruction(dataLocation<char*>() + offset);
168168
}
169169

170170
inline CodeLocationLabel CodeLocationCommon::labelAtOffset(int offset)
171171
{
172172
ASSERT_VALID_CODE_OFFSET(offset);
173-
return CodeLocationLabel(reinterpret_cast<char*>(dataLocation()) + offset);
173+
return CodeLocationLabel(dataLocation<char*>() + offset);
174174
}
175175

176176
inline CodeLocationJump CodeLocationCommon::jumpAtOffset(int offset)
177177
{
178178
ASSERT_VALID_CODE_OFFSET(offset);
179-
return CodeLocationJump(reinterpret_cast<char*>(dataLocation()) + offset);
179+
return CodeLocationJump(dataLocation<char*>() + offset);
180180
}
181181

182182
inline CodeLocationCall CodeLocationCommon::callAtOffset(int offset)
183183
{
184184
ASSERT_VALID_CODE_OFFSET(offset);
185-
return CodeLocationCall(reinterpret_cast<char*>(dataLocation()) + offset);
185+
return CodeLocationCall(dataLocation<char*>() + offset);
186186
}
187187

188188
inline CodeLocationNearCall CodeLocationCommon::nearCallAtOffset(int offset, NearCallMode callMode)
189189
{
190190
ASSERT_VALID_CODE_OFFSET(offset);
191-
return CodeLocationNearCall(reinterpret_cast<char*>(dataLocation()) + offset, callMode);
191+
return CodeLocationNearCall(dataLocation<char*>() + offset, callMode);
192192
}
193193

194194
inline CodeLocationDataLabelPtr CodeLocationCommon::dataLabelPtrAtOffset(int offset)
195195
{
196196
ASSERT_VALID_CODE_OFFSET(offset);
197-
return CodeLocationDataLabelPtr(reinterpret_cast<char*>(dataLocation()) + offset);
197+
return CodeLocationDataLabelPtr(dataLocation<char*>() + offset);
198198
}
199199

200200
inline CodeLocationDataLabel32 CodeLocationCommon::dataLabel32AtOffset(int offset)
201201
{
202202
ASSERT_VALID_CODE_OFFSET(offset);
203-
return CodeLocationDataLabel32(reinterpret_cast<char*>(dataLocation()) + offset);
203+
return CodeLocationDataLabel32(dataLocation<char*>() + offset);
204204
}
205205

206206
inline CodeLocationDataLabelCompact CodeLocationCommon::dataLabelCompactAtOffset(int offset)
207207
{
208208
ASSERT_VALID_CODE_OFFSET(offset);
209-
return CodeLocationDataLabelCompact(reinterpret_cast<char*>(dataLocation()) + offset);
209+
return CodeLocationDataLabelCompact(dataLocation<char*>() + offset);
210210
}
211211

212212
inline CodeLocationConvertibleLoad CodeLocationCommon::convertibleLoadAtOffset(int offset)
213213
{
214214
ASSERT_VALID_CODE_OFFSET(offset);
215-
return CodeLocationConvertibleLoad(reinterpret_cast<char*>(dataLocation()) + offset);
215+
return CodeLocationConvertibleLoad(dataLocation<char*>() + offset);
216216
}
217217

218218
} // namespace JSC

assembler/LinkBuffer.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ LinkBuffer::CodeRef LinkBuffer::finalizeCodeWithDisassembly(const char* format,
7070
va_end(argList);
7171
out.printf(":\n");
7272

73-
out.printf(" Code at [%p, %p):\n", result.code().executableAddress(), static_cast<char*>(result.code().executableAddress()) + result.size());
73+
out.printf(" Code at [%p, %p):\n", result.code().executableAddress(), result.code().executableAddress<char*>() + result.size());
7474

7575
CString header = out.toCString();
7676

assembler/LinkBuffer.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (C) 2009, 2010, 2012-2015 Apple Inc. All rights reserved.
2+
* Copyright (C) 2009-2017 Apple Inc. All rights reserved.
33
*
44
* Redistribution and use in source and binary forms, with or without
55
* modification, are permitted provided that the following conditions
@@ -130,7 +130,7 @@ class LinkBuffer {
130130

131131
void link(Call call, CodeLocationLabel label)
132132
{
133-
link(call, FunctionPtr(label.executableAddress()));
133+
link(call, FunctionPtr(label));
134134
}
135135

136136
void link(Jump jump, CodeLocationLabel label)
@@ -154,7 +154,7 @@ class LinkBuffer {
154154
void patch(DataLabelPtr label, CodeLocationLabel value)
155155
{
156156
AssemblerLabel target = applyOffset(label.m_label);
157-
MacroAssembler::linkPointer(code(), target, value.executableAddress());
157+
MacroAssembler::linkPointer(code(), target, value);
158158
}
159159

160160
// These methods are used to obtain handles to allow the code to be relinked / repatched later.

0 commit comments

Comments
 (0)