Title: [185346] trunk/Source
Revision
185346
Author
[email protected]
Date
2015-06-08 19:17:48 -0700 (Mon, 08 Jun 2015)

Log Message

Purge PassRefPtr in _javascript_Core
https://bugs.webkit.org/show_bug.cgi?id=145750

Source/_javascript_Core:

As a step to purge PassRefPtr, this patch replaces PassRefPtr with Ref or RefPtr.

Reviewed by Darin Adler.

* API/JSClassRef.cpp:
(OpaqueJSClass::createNoAutomaticPrototype):
* API/JSClassRef.h:
* API/JSContextRef.cpp:
* API/JSScriptRef.cpp:
(OpaqueJSScript::create):
* API/JSStringRef.cpp:
(JSStringCreateWithCharacters):
(JSStringCreateWithUTF8CString):
* API/OpaqueJSString.cpp:
(OpaqueJSString::create):
* API/OpaqueJSString.h:
(OpaqueJSString::create):
* bytecompiler/StaticPropertyAnalysis.h:
(JSC::StaticPropertyAnalysis::create):
* debugger/DebuggerCallFrame.h:
(JSC::DebuggerCallFrame::create):
* dfg/DFGToFTLDeferredCompilationCallback.cpp:
(JSC::DFG::ToFTLDeferredCompilationCallback::create):
* dfg/DFGToFTLDeferredCompilationCallback.h:
* dfg/DFGToFTLForOSREntryDeferredCompilationCallback.cpp:
(JSC::DFG::Ref<ToFTLForOSREntryDeferredCompilationCallback>ToFTLForOSREntryDeferredCompilationCallback::create):
(JSC::DFG::ToFTLForOSREntryDeferredCompilationCallback::create): Deleted.
* dfg/DFGToFTLForOSREntryDeferredCompilationCallback.h:
* dfg/DFGWorklist.cpp:
(JSC::DFG::Worklist::create):
(JSC::DFG::ensureGlobalDFGWorklist):
(JSC::DFG::ensureGlobalFTLWorklist):
* dfg/DFGWorklist.h:
* heap/EdenGCActivityCallback.h:
(JSC::GCActivityCallback::createEdenTimer):
* heap/FullGCActivityCallback.h:
(JSC::GCActivityCallback::createFullTimer):
* heap/GCActivityCallback.h:
* inspector/InjectedScriptHost.h:
* inspector/_javascript_CallFrame.h:
(Inspector::_javascript_CallFrame::create):
* inspector/ScriptArguments.cpp:
(Inspector::ScriptArguments::create):
* inspector/ScriptArguments.h:
* jit/JITStubRoutine.h:
(JSC::JITStubRoutine::createSelfManagedRoutine):
* jit/JITToDFGDeferredCompilationCallback.cpp:
(JSC::JITToDFGDeferredCompilationCallback::create):
* jit/JITToDFGDeferredCompilationCallback.h:
* jsc.cpp:
(jscmain):
* parser/NodeConstructors.h:
(JSC::ArrayPatternNode::create):
(JSC::ObjectPatternNode::create):
(JSC::BindingNode::create):
* parser/Nodes.cpp:
(JSC::FunctionParameters::create):
* parser/Nodes.h:
* parser/SourceProvider.h:
(JSC::StringSourceProvider::create):
* profiler/Profile.cpp:
(JSC::Profile::create):
* profiler/Profile.h:
* profiler/ProfileGenerator.cpp:
(JSC::ProfileGenerator::create):
* profiler/ProfileGenerator.h:
* profiler/ProfileNode.h:
(JSC::ProfileNode::create):
* runtime/DataView.cpp:
(JSC::DataView::create):
* runtime/DataView.h:
* runtime/DateInstanceCache.h:
(JSC::DateInstanceData::create):
* runtime/JSPromiseReaction.cpp:
(JSC::createExecutePromiseReactionMicrotask):
* runtime/JSPromiseReaction.h:
* runtime/PropertyNameArray.h:
(JSC::PropertyNameArrayData::create):
* runtime/TypeSet.h:
(JSC::StructureShape::create):
(JSC::TypeSet::create):
* runtime/TypedArrayBase.h:
(JSC::TypedArrayBase::create):
(JSC::TypedArrayBase::createUninitialized):
(JSC::TypedArrayBase::subarrayImpl):
* runtime/VM.cpp:
(JSC::VM::createContextGroup):
(JSC::VM::create):
(JSC::VM::createLeaked):
* runtime/VM.h:
* yarr/RegularExpression.cpp:
(JSC::Yarr::RegularExpression::Private::create):

Source/WebCore:

Reviewed by Darin Adler.

As a step to purge PassRefPtr, this patch replaces PassRefPtr with Ref or RefPtr.

No new tests, no behavior changes.

* bindings/js/JSDOMWindowBase.cpp:
(WebCore::JSDOMWindowBase::commonVM):

Modified Paths

Diff

Modified: trunk/Source/_javascript_Core/API/JSClassRef.cpp (185345 => 185346)


--- trunk/Source/_javascript_Core/API/JSClassRef.cpp	2015-06-09 00:47:25 UTC (rev 185345)
+++ trunk/Source/_javascript_Core/API/JSClassRef.cpp	2015-06-09 02:17:48 UTC (rev 185346)
@@ -108,9 +108,9 @@
         JSClassRelease(prototypeClass);
 }
 
-PassRefPtr<OpaqueJSClass> OpaqueJSClass::createNoAutomaticPrototype(const JSClassDefinition* definition)
+Ref<OpaqueJSClass> OpaqueJSClass::createNoAutomaticPrototype(const JSClassDefinition* definition)
 {
-    return adoptRef(new OpaqueJSClass(definition, 0));
+    return adoptRef(*new OpaqueJSClass(definition, 0));
 }
 
 PassRefPtr<OpaqueJSClass> OpaqueJSClass::create(const JSClassDefinition* clientDefinition)

Modified: trunk/Source/_javascript_Core/API/JSClassRef.h (185345 => 185346)


--- trunk/Source/_javascript_Core/API/JSClassRef.h	2015-06-09 00:47:25 UTC (rev 185345)
+++ trunk/Source/_javascript_Core/API/JSClassRef.h	2015-06-09 02:17:48 UTC (rev 185346)
@@ -86,7 +86,7 @@
 
 struct OpaqueJSClass : public ThreadSafeRefCounted<OpaqueJSClass> {
     static PassRefPtr<OpaqueJSClass> create(const JSClassDefinition*);
-    static PassRefPtr<OpaqueJSClass> createNoAutomaticPrototype(const JSClassDefinition*);
+    static Ref<OpaqueJSClass> createNoAutomaticPrototype(const JSClassDefinition*);
     JS_EXPORT_PRIVATE ~OpaqueJSClass();
     
     String className();

Modified: trunk/Source/_javascript_Core/API/JSContextRef.cpp (185345 => 185346)


--- trunk/Source/_javascript_Core/API/JSContextRef.cpp	2015-06-09 00:47:25 UTC (rev 185345)
+++ trunk/Source/_javascript_Core/API/JSContextRef.cpp	2015-06-09 02:17:48 UTC (rev 185346)
@@ -76,7 +76,7 @@
 JSContextGroupRef JSContextGroupCreate()
 {
     initializeThreading();
-    return toRef(VM::createContextGroup().leakRef());
+    return toRef(&VM::createContextGroup().leakRef());
 }
 
 JSContextGroupRef JSContextGroupRetain(JSContextGroupRef group)

Modified: trunk/Source/_javascript_Core/API/JSScriptRef.cpp (185345 => 185346)


--- trunk/Source/_javascript_Core/API/JSScriptRef.cpp	2015-06-09 00:47:25 UTC (rev 185345)
+++ trunk/Source/_javascript_Core/API/JSScriptRef.cpp	2015-06-09 02:17:48 UTC (rev 185346)
@@ -41,9 +41,9 @@
 
 struct OpaqueJSScript : public SourceProvider {
 public:
-    static WTF::PassRefPtr<OpaqueJSScript> create(VM* vm, const String& url, int startingLineNumber, const String& source)
+    static WTF::RefPtr<OpaqueJSScript> create(VM* vm, const String& url, int startingLineNumber, const String& source)
     {
-        return WTF::adoptRef(new OpaqueJSScript(vm, url, startingLineNumber, source));
+        return WTF::adoptRef(*new OpaqueJSScript(vm, url, startingLineNumber, source));
     }
 
     virtual const String& source() const override

Modified: trunk/Source/_javascript_Core/API/JSStringRef.cpp (185345 => 185346)


--- trunk/Source/_javascript_Core/API/JSStringRef.cpp	2015-06-09 00:47:25 UTC (rev 185345)
+++ trunk/Source/_javascript_Core/API/JSStringRef.cpp	2015-06-09 02:17:48 UTC (rev 185346)
@@ -37,7 +37,7 @@
 JSStringRef JSStringCreateWithCharacters(const JSChar* chars, size_t numChars)
 {
     initializeThreading();
-    return OpaqueJSString::create(chars, numChars).leakRef();
+    return &OpaqueJSString::create(chars, numChars).leakRef();
 }
 
 JSStringRef JSStringCreateWithUTF8CString(const char* string)
@@ -51,12 +51,12 @@
         const LChar* stringStart = reinterpret_cast<const LChar*>(string);
         if (conversionOK == convertUTF8ToUTF16(&string, string + length, &p, p + length, &sourceIsAllASCII)) {
             if (sourceIsAllASCII)
-                return OpaqueJSString::create(stringStart, length).leakRef();
-            return OpaqueJSString::create(buffer.data(), p - buffer.data()).leakRef();
+                return &OpaqueJSString::create(stringStart, length).leakRef();
+            return &OpaqueJSString::create(buffer.data(), p - buffer.data()).leakRef();
         }
     }
 
-    return OpaqueJSString::create().leakRef();
+    return &OpaqueJSString::create().leakRef();
 }
 
 JSStringRef JSStringCreateWithCharactersNoCopy(const JSChar* chars, size_t numChars)

Modified: trunk/Source/_javascript_Core/API/JSStringRefCF.cpp (185345 => 185346)


--- trunk/Source/_javascript_Core/API/JSStringRefCF.cpp	2015-06-09 00:47:25 UTC (rev 185345)
+++ trunk/Source/_javascript_Core/API/JSStringRefCF.cpp	2015-06-09 02:17:48 UTC (rev 185346)
@@ -41,18 +41,18 @@
     // it can hold.  (<rdar://problem/6806478>)
     size_t length = CFStringGetLength(string);
     if (!length)
-        return OpaqueJSString::create(reinterpret_cast<const LChar*>(""), 0).leakRef();
+        return &OpaqueJSString::create(reinterpret_cast<const LChar*>(""), 0).leakRef();
 
     Vector<LChar, 1024> lcharBuffer(length);
     CFIndex usedBufferLength;
     CFIndex convertedSize = CFStringGetBytes(string, CFRangeMake(0, length), kCFStringEncodingISOLatin1, 0, false, lcharBuffer.data(), length, &usedBufferLength);
     if (static_cast<size_t>(convertedSize) == length && static_cast<size_t>(usedBufferLength) == length)
-        return OpaqueJSString::create(lcharBuffer.data(), length).leakRef();
+        return &OpaqueJSString::create(lcharBuffer.data(), length).leakRef();
 
     auto buffer = std::make_unique<UniChar[]>(length);
     CFStringGetCharacters(string, CFRangeMake(0, length), buffer.get());
     static_assert(sizeof(UniChar) == sizeof(UChar), "UniChar and UChar must be same size");
-    return OpaqueJSString::create(reinterpret_cast<UChar*>(buffer.get()), length).leakRef();
+    return &OpaqueJSString::create(reinterpret_cast<UChar*>(buffer.get()), length).leakRef();
 }
 
 CFStringRef JSStringCopyCFString(CFAllocatorRef allocator, JSStringRef string)

Modified: trunk/Source/_javascript_Core/API/OpaqueJSString.cpp (185345 => 185346)


--- trunk/Source/_javascript_Core/API/OpaqueJSString.cpp	2015-06-09 00:47:25 UTC (rev 185345)
+++ trunk/Source/_javascript_Core/API/OpaqueJSString.cpp	2015-06-09 02:17:48 UTC (rev 185346)
@@ -34,7 +34,7 @@
 
 using namespace JSC;
 
-PassRefPtr<OpaqueJSString> OpaqueJSString::create(const String& string)
+RefPtr<OpaqueJSString> OpaqueJSString::create(const String& string)
 {
     if (string.isNull())
         return nullptr;

Modified: trunk/Source/_javascript_Core/API/OpaqueJSString.h (185345 => 185346)


--- trunk/Source/_javascript_Core/API/OpaqueJSString.h	2015-06-09 00:47:25 UTC (rev 185345)
+++ trunk/Source/_javascript_Core/API/OpaqueJSString.h	2015-06-09 02:17:48 UTC (rev 185346)
@@ -36,22 +36,22 @@
 }
 
 struct OpaqueJSString : public ThreadSafeRefCounted<OpaqueJSString> {
-    static PassRefPtr<OpaqueJSString> create()
+    static Ref<OpaqueJSString> create()
     {
-        return adoptRef(new OpaqueJSString);
+        return adoptRef(*new OpaqueJSString);
     }
 
-    static PassRefPtr<OpaqueJSString> create(const LChar* characters, unsigned length)
+    static Ref<OpaqueJSString> create(const LChar* characters, unsigned length)
     {
-        return adoptRef(new OpaqueJSString(characters, length));
+        return adoptRef(*new OpaqueJSString(characters, length));
     }
 
-    static PassRefPtr<OpaqueJSString> create(const UChar* characters, unsigned length)
+    static Ref<OpaqueJSString> create(const UChar* characters, unsigned length)
     {
-        return adoptRef(new OpaqueJSString(characters, length));
+        return adoptRef(*new OpaqueJSString(characters, length));
     }
 
-    JS_EXPORT_PRIVATE static PassRefPtr<OpaqueJSString> create(const String&);
+    JS_EXPORT_PRIVATE static RefPtr<OpaqueJSString> create(const String&);
 
     JS_EXPORT_PRIVATE ~OpaqueJSString();
 

Modified: trunk/Source/_javascript_Core/ChangeLog (185345 => 185346)


--- trunk/Source/_javascript_Core/ChangeLog	2015-06-09 00:47:25 UTC (rev 185345)
+++ trunk/Source/_javascript_Core/ChangeLog	2015-06-09 02:17:48 UTC (rev 185346)
@@ -1,3 +1,101 @@
+2015-06-08  Gyuyoung Kim  <[email protected]>
+
+        Purge PassRefPtr in _javascript_Core
+        https://bugs.webkit.org/show_bug.cgi?id=145750
+
+        As a step to purge PassRefPtr, this patch replaces PassRefPtr with Ref or RefPtr.
+
+        Reviewed by Darin Adler.
+
+        * API/JSClassRef.cpp:
+        (OpaqueJSClass::createNoAutomaticPrototype):
+        * API/JSClassRef.h:
+        * API/JSContextRef.cpp:
+        * API/JSScriptRef.cpp:
+        (OpaqueJSScript::create):
+        * API/JSStringRef.cpp:
+        (JSStringCreateWithCharacters):
+        (JSStringCreateWithUTF8CString):
+        * API/OpaqueJSString.cpp:
+        (OpaqueJSString::create):
+        * API/OpaqueJSString.h:
+        (OpaqueJSString::create):
+        * bytecompiler/StaticPropertyAnalysis.h:
+        (JSC::StaticPropertyAnalysis::create):
+        * debugger/DebuggerCallFrame.h:
+        (JSC::DebuggerCallFrame::create):
+        * dfg/DFGToFTLDeferredCompilationCallback.cpp:
+        (JSC::DFG::ToFTLDeferredCompilationCallback::create):
+        * dfg/DFGToFTLDeferredCompilationCallback.h:
+        * dfg/DFGToFTLForOSREntryDeferredCompilationCallback.cpp:
+        (JSC::DFG::Ref<ToFTLForOSREntryDeferredCompilationCallback>ToFTLForOSREntryDeferredCompilationCallback::create):
+        (JSC::DFG::ToFTLForOSREntryDeferredCompilationCallback::create): Deleted.
+        * dfg/DFGToFTLForOSREntryDeferredCompilationCallback.h:
+        * dfg/DFGWorklist.cpp:
+        (JSC::DFG::Worklist::create):
+        (JSC::DFG::ensureGlobalDFGWorklist):
+        (JSC::DFG::ensureGlobalFTLWorklist):
+        * dfg/DFGWorklist.h:
+        * heap/EdenGCActivityCallback.h:
+        (JSC::GCActivityCallback::createEdenTimer):
+        * heap/FullGCActivityCallback.h:
+        (JSC::GCActivityCallback::createFullTimer):
+        * heap/GCActivityCallback.h:
+        * inspector/InjectedScriptHost.h:
+        * inspector/_javascript_CallFrame.h:
+        (Inspector::_javascript_CallFrame::create):
+        * inspector/ScriptArguments.cpp:
+        (Inspector::ScriptArguments::create):
+        * inspector/ScriptArguments.h:
+        * jit/JITStubRoutine.h:
+        (JSC::JITStubRoutine::createSelfManagedRoutine):
+        * jit/JITToDFGDeferredCompilationCallback.cpp:
+        (JSC::JITToDFGDeferredCompilationCallback::create):
+        * jit/JITToDFGDeferredCompilationCallback.h:
+        * jsc.cpp:
+        (jscmain):
+        * parser/NodeConstructors.h:
+        (JSC::ArrayPatternNode::create):
+        (JSC::ObjectPatternNode::create):
+        (JSC::BindingNode::create):
+        * parser/Nodes.cpp:
+        (JSC::FunctionParameters::create):
+        * parser/Nodes.h:
+        * parser/SourceProvider.h:
+        (JSC::StringSourceProvider::create):
+        * profiler/Profile.cpp:
+        (JSC::Profile::create):
+        * profiler/Profile.h:
+        * profiler/ProfileGenerator.cpp:
+        (JSC::ProfileGenerator::create):
+        * profiler/ProfileGenerator.h:
+        * profiler/ProfileNode.h:
+        (JSC::ProfileNode::create):
+        * runtime/DataView.cpp:
+        (JSC::DataView::create):
+        * runtime/DataView.h:
+        * runtime/DateInstanceCache.h:
+        (JSC::DateInstanceData::create):
+        * runtime/JSPromiseReaction.cpp:
+        (JSC::createExecutePromiseReactionMicrotask):
+        * runtime/JSPromiseReaction.h:
+        * runtime/PropertyNameArray.h:
+        (JSC::PropertyNameArrayData::create):
+        * runtime/TypeSet.h:
+        (JSC::StructureShape::create):
+        (JSC::TypeSet::create):
+        * runtime/TypedArrayBase.h:
+        (JSC::TypedArrayBase::create):
+        (JSC::TypedArrayBase::createUninitialized):
+        (JSC::TypedArrayBase::subarrayImpl):
+        * runtime/VM.cpp:
+        (JSC::VM::createContextGroup):
+        (JSC::VM::create):
+        (JSC::VM::createLeaked):
+        * runtime/VM.h:
+        * yarr/RegularExpression.cpp:
+        (JSC::Yarr::RegularExpression::Private::create):
+
 2015-06-08  Filip Pizlo  <[email protected]>
 
         It should be possible to hoist all constants in DFG SSA

Modified: trunk/Source/_javascript_Core/bytecompiler/StaticPropertyAnalysis.h (185345 => 185346)


--- trunk/Source/_javascript_Core/bytecompiler/StaticPropertyAnalysis.h	2015-06-09 00:47:25 UTC (rev 185345)
+++ trunk/Source/_javascript_Core/bytecompiler/StaticPropertyAnalysis.h	2015-06-09 02:17:48 UTC (rev 185346)
@@ -35,9 +35,9 @@
 // Reference count indicates number of live registers that alias this object.
 class StaticPropertyAnalysis : public RefCounted<StaticPropertyAnalysis> {
 public:
-    static PassRefPtr<StaticPropertyAnalysis> create(Vector<UnlinkedInstruction, 0, UnsafeVectorOverflow>* instructions, unsigned target)
+    static Ref<StaticPropertyAnalysis> create(Vector<UnlinkedInstruction, 0, UnsafeVectorOverflow>* instructions, unsigned target)
     {
-        return adoptRef(new StaticPropertyAnalysis(instructions, target)); 
+        return adoptRef(*new StaticPropertyAnalysis(instructions, target)); 
     }
 
     void addPropertyIndex(unsigned propertyIndex) { m_propertyIndexes.add(propertyIndex); }

Modified: trunk/Source/_javascript_Core/debugger/DebuggerCallFrame.h (185345 => 185346)


--- trunk/Source/_javascript_Core/debugger/DebuggerCallFrame.h	2015-06-09 00:47:25 UTC (rev 185345)
+++ trunk/Source/_javascript_Core/debugger/DebuggerCallFrame.h	2015-06-09 02:17:48 UTC (rev 185346)
@@ -46,9 +46,9 @@
 public:
     enum Type { ProgramType, FunctionType };
 
-    static PassRefPtr<DebuggerCallFrame> create(CallFrame* callFrame)
+    static Ref<DebuggerCallFrame> create(CallFrame* callFrame)
     {
-        return adoptRef(new DebuggerCallFrame(callFrame));
+        return adoptRef(*new DebuggerCallFrame(callFrame));
     }
 
     JS_EXPORT_PRIVATE explicit DebuggerCallFrame(CallFrame*);

Modified: trunk/Source/_javascript_Core/dfg/DFGToFTLDeferredCompilationCallback.cpp (185345 => 185346)


--- trunk/Source/_javascript_Core/dfg/DFGToFTLDeferredCompilationCallback.cpp	2015-06-09 00:47:25 UTC (rev 185345)
+++ trunk/Source/_javascript_Core/dfg/DFGToFTLDeferredCompilationCallback.cpp	2015-06-09 02:17:48 UTC (rev 185346)
@@ -43,10 +43,9 @@
 
 ToFTLDeferredCompilationCallback::~ToFTLDeferredCompilationCallback() { }
 
-PassRefPtr<ToFTLDeferredCompilationCallback> ToFTLDeferredCompilationCallback::create(
-    PassRefPtr<CodeBlock> dfgCodeBlock)
+Ref<ToFTLDeferredCompilationCallback> ToFTLDeferredCompilationCallback::create(PassRefPtr<CodeBlock> dfgCodeBlock)
 {
-    return adoptRef(new ToFTLDeferredCompilationCallback(dfgCodeBlock));
+    return adoptRef(*new ToFTLDeferredCompilationCallback(dfgCodeBlock));
 }
 
 void ToFTLDeferredCompilationCallback::compilationDidBecomeReadyAsynchronously(

Modified: trunk/Source/_javascript_Core/dfg/DFGToFTLDeferredCompilationCallback.h (185345 => 185346)


--- trunk/Source/_javascript_Core/dfg/DFGToFTLDeferredCompilationCallback.h	2015-06-09 00:47:25 UTC (rev 185345)
+++ trunk/Source/_javascript_Core/dfg/DFGToFTLDeferredCompilationCallback.h	2015-06-09 02:17:48 UTC (rev 185346)
@@ -45,8 +45,7 @@
 public:
     virtual ~ToFTLDeferredCompilationCallback();
 
-    static PassRefPtr<ToFTLDeferredCompilationCallback> create(
-        PassRefPtr<CodeBlock> dfgCodeBlock);
+    static Ref<ToFTLDeferredCompilationCallback> create(PassRefPtr<CodeBlock> dfgCodeBlock);
     
     virtual void compilationDidBecomeReadyAsynchronously(CodeBlock*);
     virtual void compilationDidComplete(CodeBlock*, CompilationResult);

Modified: trunk/Source/_javascript_Core/dfg/DFGToFTLForOSREntryDeferredCompilationCallback.cpp (185345 => 185346)


--- trunk/Source/_javascript_Core/dfg/DFGToFTLForOSREntryDeferredCompilationCallback.cpp	2015-06-09 00:47:25 UTC (rev 185345)
+++ trunk/Source/_javascript_Core/dfg/DFGToFTLForOSREntryDeferredCompilationCallback.cpp	2015-06-09 02:17:48 UTC (rev 185346)
@@ -45,11 +45,10 @@
 {
 }
 
-PassRefPtr<ToFTLForOSREntryDeferredCompilationCallback>
-ToFTLForOSREntryDeferredCompilationCallback::create(
+Ref<ToFTLForOSREntryDeferredCompilationCallback>ToFTLForOSREntryDeferredCompilationCallback::create(
     PassRefPtr<CodeBlock> dfgCodeBlock)
 {
-    return adoptRef(new ToFTLForOSREntryDeferredCompilationCallback(dfgCodeBlock));
+    return adoptRef(*new ToFTLForOSREntryDeferredCompilationCallback(dfgCodeBlock));
 }
 
 void ToFTLForOSREntryDeferredCompilationCallback::compilationDidBecomeReadyAsynchronously(

Modified: trunk/Source/_javascript_Core/dfg/DFGToFTLForOSREntryDeferredCompilationCallback.h (185345 => 185346)


--- trunk/Source/_javascript_Core/dfg/DFGToFTLForOSREntryDeferredCompilationCallback.h	2015-06-09 00:47:25 UTC (rev 185345)
+++ trunk/Source/_javascript_Core/dfg/DFGToFTLForOSREntryDeferredCompilationCallback.h	2015-06-09 02:17:48 UTC (rev 185346)
@@ -45,8 +45,7 @@
 public:
     virtual ~ToFTLForOSREntryDeferredCompilationCallback();
 
-    static PassRefPtr<ToFTLForOSREntryDeferredCompilationCallback> create(
-        PassRefPtr<CodeBlock> dfgCodeBlock);
+    static Ref<ToFTLForOSREntryDeferredCompilationCallback> create(PassRefPtr<CodeBlock> dfgCodeBlock);
     
     virtual void compilationDidBecomeReadyAsynchronously(CodeBlock*);
     virtual void compilationDidComplete(CodeBlock*, CompilationResult);

Modified: trunk/Source/_javascript_Core/dfg/DFGWorklist.cpp (185345 => 185346)


--- trunk/Source/_javascript_Core/dfg/DFGWorklist.cpp	2015-06-09 00:47:25 UTC (rev 185345)
+++ trunk/Source/_javascript_Core/dfg/DFGWorklist.cpp	2015-06-09 02:17:48 UTC (rev 185346)
@@ -68,9 +68,9 @@
     }
 }
 
-PassRefPtr<Worklist> Worklist::create(CString worklistName, unsigned numberOfThreads, int relativePriority)
+Ref<Worklist> Worklist::create(CString worklistName, unsigned numberOfThreads, int relativePriority)
 {
-    RefPtr<Worklist> result = adoptRef(new Worklist(worklistName));
+    Ref<Worklist> result = adoptRef(*new Worklist(worklistName));
     result->finishCreation(numberOfThreads, relativePriority);
     return result;
 }
@@ -406,7 +406,7 @@
 {
     static std::once_flag initializeGlobalWorklistOnceFlag;
     std::call_once(initializeGlobalWorklistOnceFlag, [] {
-        theGlobalDFGWorklist = Worklist::create("DFG Worklist", Options::numberOfDFGCompilerThreads(), Options::priorityDeltaOfDFGCompilerThreads()).leakRef();
+        theGlobalDFGWorklist = &Worklist::create("DFG Worklist", Options::numberOfDFGCompilerThreads(), Options::priorityDeltaOfDFGCompilerThreads()).leakRef();
     });
     return theGlobalDFGWorklist;
 }
@@ -422,7 +422,7 @@
 {
     static std::once_flag initializeGlobalWorklistOnceFlag;
     std::call_once(initializeGlobalWorklistOnceFlag, [] {
-        theGlobalFTLWorklist = Worklist::create("FTL Worklist", Options::numberOfFTLCompilerThreads(), Options::priorityDeltaOfFTLCompilerThreads()).leakRef();
+        theGlobalFTLWorklist = &Worklist::create("FTL Worklist", Options::numberOfFTLCompilerThreads(), Options::priorityDeltaOfFTLCompilerThreads()).leakRef();
     });
     return theGlobalFTLWorklist;
 }

Modified: trunk/Source/_javascript_Core/dfg/DFGWorklist.h (185345 => 185346)


--- trunk/Source/_javascript_Core/dfg/DFGWorklist.h	2015-06-09 00:47:25 UTC (rev 185345)
+++ trunk/Source/_javascript_Core/dfg/DFGWorklist.h	2015-06-09 02:17:48 UTC (rev 185346)
@@ -48,7 +48,7 @@
 
     ~Worklist();
     
-    static PassRefPtr<Worklist> create(CString worklistName, unsigned numberOfThreads, int relativePriority = 0);
+    static Ref<Worklist> create(CString worklistName, unsigned numberOfThreads, int relativePriority = 0);
     
     void enqueue(PassRefPtr<Plan>);
     

Modified: trunk/Source/_javascript_Core/heap/EdenGCActivityCallback.h (185345 => 185346)


--- trunk/Source/_javascript_Core/heap/EdenGCActivityCallback.h	2015-06-09 00:47:25 UTC (rev 185345)
+++ trunk/Source/_javascript_Core/heap/EdenGCActivityCallback.h	2015-06-09 02:17:48 UTC (rev 185346)
@@ -49,7 +49,7 @@
     virtual double deathRate() override;
 };
 
-inline PassRefPtr<GCActivityCallback> GCActivityCallback::createEdenTimer(Heap* heap)
+inline RefPtr<GCActivityCallback> GCActivityCallback::createEdenTimer(Heap* heap)
 {
     return s_shouldCreateGCTimer ? adoptRef(new EdenGCActivityCallback(heap)) : nullptr;
 }

Modified: trunk/Source/_javascript_Core/heap/FullGCActivityCallback.h (185345 => 185346)


--- trunk/Source/_javascript_Core/heap/FullGCActivityCallback.h	2015-06-09 00:47:25 UTC (rev 185345)
+++ trunk/Source/_javascript_Core/heap/FullGCActivityCallback.h	2015-06-09 02:17:48 UTC (rev 185346)
@@ -49,7 +49,7 @@
     virtual double deathRate() override;
 };
 
-inline PassRefPtr<GCActivityCallback> GCActivityCallback::createFullTimer(Heap* heap)
+inline RefPtr<GCActivityCallback> GCActivityCallback::createFullTimer(Heap* heap)
 {
     return s_shouldCreateGCTimer ? adoptRef(new FullGCActivityCallback(heap)) : nullptr;
 }

Modified: trunk/Source/_javascript_Core/heap/GCActivityCallback.h (185345 => 185346)


--- trunk/Source/_javascript_Core/heap/GCActivityCallback.h	2015-06-09 00:47:25 UTC (rev 185345)
+++ trunk/Source/_javascript_Core/heap/GCActivityCallback.h	2015-06-09 02:17:48 UTC (rev 185346)
@@ -30,7 +30,7 @@
 #define GCActivityCallback_h
 
 #include "HeapTimer.h"
-#include <wtf/PassRefPtr.h>
+#include <wtf/RefPtr.h>
 
 #if USE(CF)
 #include <CoreFoundation/CoreFoundation.h>
@@ -43,8 +43,8 @@
 class JS_EXPORT_PRIVATE GCActivityCallback : public HeapTimer, public ThreadSafeRefCounted<GCActivityCallback> {
     WTF_MAKE_FAST_ALLOCATED;
 public:
-    static PassRefPtr<GCActivityCallback> createFullTimer(Heap*);
-    static PassRefPtr<GCActivityCallback> createEdenTimer(Heap*);
+    static RefPtr<GCActivityCallback> createFullTimer(Heap*);
+    static RefPtr<GCActivityCallback> createEdenTimer(Heap*);
 
     GCActivityCallback(Heap*);
 

Modified: trunk/Source/_javascript_Core/inspector/InjectedScriptHost.h (185345 => 185346)


--- trunk/Source/_javascript_Core/inspector/InjectedScriptHost.h	2015-06-09 00:47:25 UTC (rev 185345)
+++ trunk/Source/_javascript_Core/inspector/InjectedScriptHost.h	2015-06-09 02:17:48 UTC (rev 185346)
@@ -36,7 +36,7 @@
 
 class JS_EXPORT_PRIVATE InjectedScriptHost : public RefCounted<InjectedScriptHost> {
 public:
-    static PassRefPtr<InjectedScriptHost> create() { return adoptRef(new InjectedScriptHost); }
+    static Ref<InjectedScriptHost> create() { return adoptRef(*new InjectedScriptHost); }
     virtual ~InjectedScriptHost();
 
     virtual JSC::JSValue subtype(JSC::ExecState*, JSC::JSValue) { return JSC::jsUndefined(); }

Modified: trunk/Source/_javascript_Core/inspector/_javascript_CallFrame.h (185345 => 185346)


--- trunk/Source/_javascript_Core/inspector/_javascript_CallFrame.h	2015-06-09 00:47:25 UTC (rev 185345)
+++ trunk/Source/_javascript_Core/inspector/_javascript_CallFrame.h	2015-06-09 02:17:48 UTC (rev 185346)
@@ -38,9 +38,9 @@
 
 class _javascript_CallFrame : public RefCounted<_javascript_CallFrame> {
 public:
-    static PassRefPtr<_javascript_CallFrame> create(PassRefPtr<JSC::DebuggerCallFrame> debuggerCallFrame)
+    static Ref<_javascript_CallFrame> create(PassRefPtr<JSC::DebuggerCallFrame> debuggerCallFrame)
     {
-        return adoptRef(new _javascript_CallFrame(debuggerCallFrame));
+        return adoptRef(*new _javascript_CallFrame(debuggerCallFrame));
     }
 
     _javascript_CallFrame* caller();

Modified: trunk/Source/_javascript_Core/inspector/ScriptArguments.cpp (185345 => 185346)


--- trunk/Source/_javascript_Core/inspector/ScriptArguments.cpp	2015-06-09 00:47:25 UTC (rev 185345)
+++ trunk/Source/_javascript_Core/inspector/ScriptArguments.cpp	2015-06-09 02:17:48 UTC (rev 185346)
@@ -37,9 +37,9 @@
 
 namespace Inspector {
 
-PassRefPtr<ScriptArguments> ScriptArguments::create(JSC::ExecState* scriptState, Vector<Deprecated::ScriptValue>& arguments)
+Ref<ScriptArguments> ScriptArguments::create(JSC::ExecState* scriptState, Vector<Deprecated::ScriptValue>& arguments)
 {
-    return adoptRef(new ScriptArguments(scriptState, arguments));
+    return adoptRef(*new ScriptArguments(scriptState, arguments));
 }
 
 ScriptArguments::ScriptArguments(JSC::ExecState* execState, Vector<Deprecated::ScriptValue>& arguments)

Modified: trunk/Source/_javascript_Core/inspector/ScriptArguments.h (185345 => 185346)


--- trunk/Source/_javascript_Core/inspector/ScriptArguments.h	2015-06-09 00:47:25 UTC (rev 185345)
+++ trunk/Source/_javascript_Core/inspector/ScriptArguments.h	2015-06-09 02:17:48 UTC (rev 185346)
@@ -51,7 +51,7 @@
 
 class JS_EXPORT_PRIVATE ScriptArguments : public RefCounted<ScriptArguments> {
 public:
-    static PassRefPtr<ScriptArguments> create(JSC::ExecState*, Vector<Deprecated::ScriptValue>& arguments);
+    static Ref<ScriptArguments> create(JSC::ExecState*, Vector<Deprecated::ScriptValue>& arguments);
     ~ScriptArguments();
 
     const Deprecated::ScriptValue& argumentAt(size_t) const;

Modified: trunk/Source/_javascript_Core/jit/JITStubRoutine.h (185345 => 185346)


--- trunk/Source/_javascript_Core/jit/JITStubRoutine.h	2015-06-09 00:47:25 UTC (rev 185345)
+++ trunk/Source/_javascript_Core/jit/JITStubRoutine.h	2015-06-09 02:17:48 UTC (rev 185346)
@@ -60,10 +60,10 @@
     
     // Use this if you want to pass a CodePtr to someone who insists on taking
     // a RefPtr<JITStubRoutine>.
-    static PassRefPtr<JITStubRoutine> createSelfManagedRoutine(
+    static Ref<JITStubRoutine> createSelfManagedRoutine(
         MacroAssemblerCodePtr rawCodePointer)
     {
-        return adoptRef(new JITStubRoutine(MacroAssemblerCodeRef::createSelfManagedCodeRef(rawCodePointer)));
+        return adoptRef(*new JITStubRoutine(MacroAssemblerCodeRef::createSelfManagedCodeRef(rawCodePointer)));
     }
     
     virtual ~JITStubRoutine();

Modified: trunk/Source/_javascript_Core/jit/JITToDFGDeferredCompilationCallback.cpp (185345 => 185346)


--- trunk/Source/_javascript_Core/jit/JITToDFGDeferredCompilationCallback.cpp	2015-06-09 00:47:25 UTC (rev 185345)
+++ trunk/Source/_javascript_Core/jit/JITToDFGDeferredCompilationCallback.cpp	2015-06-09 02:17:48 UTC (rev 185346)
@@ -37,9 +37,9 @@
 JITToDFGDeferredCompilationCallback::JITToDFGDeferredCompilationCallback() { }
 JITToDFGDeferredCompilationCallback::~JITToDFGDeferredCompilationCallback() { }
 
-PassRefPtr<JITToDFGDeferredCompilationCallback> JITToDFGDeferredCompilationCallback::create()
+Ref<JITToDFGDeferredCompilationCallback> JITToDFGDeferredCompilationCallback::create()
 {
-    return adoptRef(new JITToDFGDeferredCompilationCallback());
+    return adoptRef(*new JITToDFGDeferredCompilationCallback());
 }
 
 void JITToDFGDeferredCompilationCallback::compilationDidBecomeReadyAsynchronously(

Modified: trunk/Source/_javascript_Core/jit/JITToDFGDeferredCompilationCallback.h (185345 => 185346)


--- trunk/Source/_javascript_Core/jit/JITToDFGDeferredCompilationCallback.h	2015-06-09 00:47:25 UTC (rev 185345)
+++ trunk/Source/_javascript_Core/jit/JITToDFGDeferredCompilationCallback.h	2015-06-09 02:17:48 UTC (rev 185346)
@@ -42,7 +42,7 @@
 public:
     virtual ~JITToDFGDeferredCompilationCallback();
 
-    static PassRefPtr<JITToDFGDeferredCompilationCallback> create();
+    static Ref<JITToDFGDeferredCompilationCallback> create();
     
     virtual void compilationDidBecomeReadyAsynchronously(CodeBlock*) override;
     virtual void compilationDidComplete(CodeBlock*, CompilationResult) override;

Modified: trunk/Source/_javascript_Core/jsc.cpp (185345 => 185346)


--- trunk/Source/_javascript_Core/jsc.cpp	2015-06-09 00:47:25 UTC (rev 185345)
+++ trunk/Source/_javascript_Core/jsc.cpp	2015-06-09 02:17:48 UTC (rev 185346)
@@ -1504,7 +1504,7 @@
     // Note that the options parsing can affect VM creation, and thus
     // comes first.
     CommandLine options(argc, argv);
-    VM* vm = VM::create(LargeHeap).leakRef();
+    VM* vm = &VM::create(LargeHeap).leakRef();
     int result;
     {
         JSLockHolder locker(vm);

Modified: trunk/Source/_javascript_Core/parser/NodeConstructors.h (185345 => 185346)


--- trunk/Source/_javascript_Core/parser/NodeConstructors.h	2015-06-09 00:47:25 UTC (rev 185345)
+++ trunk/Source/_javascript_Core/parser/NodeConstructors.h	2015-06-09 02:17:48 UTC (rev 185346)
@@ -943,9 +943,9 @@
     {
     }
     
-    inline PassRefPtr<ArrayPatternNode> ArrayPatternNode::create()
+    inline Ref<ArrayPatternNode> ArrayPatternNode::create()
     {
-        return adoptRef(new ArrayPatternNode);
+        return adoptRef(*new ArrayPatternNode);
     }
     
     inline ObjectPatternNode::ObjectPatternNode()
@@ -953,14 +953,14 @@
     {
     }
     
-    inline PassRefPtr<ObjectPatternNode> ObjectPatternNode::create()
+    inline Ref<ObjectPatternNode> ObjectPatternNode::create()
     {
-        return adoptRef(new ObjectPatternNode);
+        return adoptRef(*new ObjectPatternNode);
     }
 
-    inline PassRefPtr<BindingNode> BindingNode::create(const Identifier& boundProperty, const JSTextPosition& start, const JSTextPosition& end)
+    inline Ref<BindingNode> BindingNode::create(const Identifier& boundProperty, const JSTextPosition& start, const JSTextPosition& end)
     {
-        return adoptRef(new BindingNode(boundProperty, start, end));
+        return adoptRef(*new BindingNode(boundProperty, start, end));
     }
     
     inline BindingNode::BindingNode(const Identifier& boundProperty, const JSTextPosition& start, const JSTextPosition& end)

Modified: trunk/Source/_javascript_Core/parser/Nodes.cpp (185345 => 185346)


--- trunk/Source/_javascript_Core/parser/Nodes.cpp	2015-06-09 00:47:25 UTC (rev 185345)
+++ trunk/Source/_javascript_Core/parser/Nodes.cpp	2015-06-09 02:17:48 UTC (rev 185346)
@@ -139,7 +139,7 @@
 
 // ------------------------------ FunctionBodyNode -----------------------------
 
-PassRefPtr<FunctionParameters> FunctionParameters::create(ParameterNode* firstParameter)
+Ref<FunctionParameters> FunctionParameters::create(ParameterNode* firstParameter)
 {
     unsigned parameterCount = 0;
     for (ParameterNode* parameter = firstParameter; parameter; parameter = parameter->nextParam())
@@ -147,7 +147,7 @@
 
     size_t objectSize = sizeof(FunctionParameters) - sizeof(void*) + sizeof(DeconstructionPatternNode*) * parameterCount;
     void* slot = fastMalloc(objectSize);
-    return adoptRef(new (slot) FunctionParameters(firstParameter, parameterCount));
+    return adoptRef(*new (slot) FunctionParameters(firstParameter, parameterCount));
 }
 
 FunctionParameters::FunctionParameters(ParameterNode* firstParameter, unsigned size)

Modified: trunk/Source/_javascript_Core/parser/Nodes.h (185345 => 185346)


--- trunk/Source/_javascript_Core/parser/Nodes.h	2015-06-09 00:47:25 UTC (rev 185345)
+++ trunk/Source/_javascript_Core/parser/Nodes.h	2015-06-09 02:17:48 UTC (rev 185346)
@@ -1634,7 +1634,7 @@
         WTF_MAKE_FAST_ALLOCATED;
         WTF_MAKE_NONCOPYABLE(FunctionParameters);
     public:
-        static PassRefPtr<FunctionParameters> create(ParameterNode*);
+        static Ref<FunctionParameters> create(ParameterNode*);
         ~FunctionParameters();
 
         unsigned size() const { return m_size; }
@@ -1782,7 +1782,7 @@
 
     class ArrayPatternNode : public DeconstructionPatternNode {
     public:
-        static PassRefPtr<ArrayPatternNode> create();
+        static Ref<ArrayPatternNode> create();
         void appendIndex(const JSTokenLocation&, DeconstructionPatternNode* node)
         {
             m_targetPatterns.append(node);
@@ -1800,7 +1800,7 @@
     
     class ObjectPatternNode : public DeconstructionPatternNode {
     public:
-        static PassRefPtr<ObjectPatternNode> create();
+        static Ref<ObjectPatternNode> create();
         void appendEntry(const JSTokenLocation&, const Identifier& identifier, bool wasString, DeconstructionPatternNode* pattern)
         {
             m_targetPatterns.append(Entry(identifier, wasString, pattern));
@@ -1827,7 +1827,7 @@
 
     class BindingNode : public DeconstructionPatternNode {
     public:
-        static PassRefPtr<BindingNode> create(const Identifier& boundProperty, const JSTextPosition& start, const JSTextPosition& end);
+        static Ref<BindingNode> create(const Identifier& boundProperty, const JSTextPosition& start, const JSTextPosition& end);
         const Identifier& boundProperty() const { return m_boundProperty; }
 
         const JSTextPosition& divotStart() const { return m_divotStart; }

Modified: trunk/Source/_javascript_Core/parser/SourceProvider.h (185345 => 185346)


--- trunk/Source/_javascript_Core/parser/SourceProvider.h	2015-06-09 00:47:25 UTC (rev 185345)
+++ trunk/Source/_javascript_Core/parser/SourceProvider.h	2015-06-09 02:17:48 UTC (rev 185346)
@@ -74,9 +74,9 @@
 
     class StringSourceProvider : public SourceProvider {
     public:
-        static PassRefPtr<StringSourceProvider> create(const String& source, const String& url, const TextPosition& startPosition = TextPosition::minimumPosition())
+        static Ref<StringSourceProvider> create(const String& source, const String& url, const TextPosition& startPosition = TextPosition::minimumPosition())
         {
-            return adoptRef(new StringSourceProvider(source, url, startPosition));
+            return adoptRef(*new StringSourceProvider(source, url, startPosition));
         }
 
         virtual const String& source() const override

Modified: trunk/Source/_javascript_Core/profiler/Profile.cpp (185345 => 185346)


--- trunk/Source/_javascript_Core/profiler/Profile.cpp	2015-06-09 00:47:25 UTC (rev 185345)
+++ trunk/Source/_javascript_Core/profiler/Profile.cpp	2015-06-09 02:17:48 UTC (rev 185346)
@@ -31,9 +31,9 @@
 
 namespace JSC {
 
-PassRefPtr<Profile> Profile::create(const String& title, unsigned uid, double startTime)
+Ref<Profile> Profile::create(const String& title, unsigned uid, double startTime)
 {
-    return adoptRef(new Profile(title, uid, startTime));
+    return adoptRef(*new Profile(title, uid, startTime));
 }
 
 Profile::Profile(const String& title, unsigned uid, double startTime)

Modified: trunk/Source/_javascript_Core/profiler/Profile.h (185345 => 185346)


--- trunk/Source/_javascript_Core/profiler/Profile.h	2015-06-09 00:47:25 UTC (rev 185345)
+++ trunk/Source/_javascript_Core/profiler/Profile.h	2015-06-09 02:17:48 UTC (rev 185346)
@@ -35,7 +35,7 @@
 
 class JS_EXPORT_PRIVATE Profile : public RefCounted<Profile> {
 public:
-    static PassRefPtr<Profile> create(const String& title, unsigned uid, double);
+    static Ref<Profile> create(const String& title, unsigned uid, double);
     virtual ~Profile();
 
     const String& title() const { return m_title; }

Modified: trunk/Source/_javascript_Core/profiler/ProfileGenerator.cpp (185345 => 185346)


--- trunk/Source/_javascript_Core/profiler/ProfileGenerator.cpp	2015-06-09 00:47:25 UTC (rev 185345)
+++ trunk/Source/_javascript_Core/profiler/ProfileGenerator.cpp	2015-06-09 02:17:48 UTC (rev 185346)
@@ -39,9 +39,9 @@
 
 namespace JSC {
 
-PassRefPtr<ProfileGenerator> ProfileGenerator::create(ExecState* exec, const String& title, unsigned uid, PassRefPtr<Stopwatch> stopwatch)
+Ref<ProfileGenerator> ProfileGenerator::create(ExecState* exec, const String& title, unsigned uid, PassRefPtr<Stopwatch> stopwatch)
 {
-    return adoptRef(new ProfileGenerator(exec, title, uid, stopwatch));
+    return adoptRef(*new ProfileGenerator(exec, title, uid, stopwatch));
 }
 
 ProfileGenerator::ProfileGenerator(ExecState* exec, const String& title, unsigned uid, PassRefPtr<Stopwatch> stopwatch)

Modified: trunk/Source/_javascript_Core/profiler/ProfileGenerator.h (185345 => 185346)


--- trunk/Source/_javascript_Core/profiler/ProfileGenerator.h	2015-06-09 00:47:25 UTC (rev 185345)
+++ trunk/Source/_javascript_Core/profiler/ProfileGenerator.h	2015-06-09 02:17:48 UTC (rev 185346)
@@ -43,7 +43,7 @@
 
     class ProfileGenerator : public RefCounted<ProfileGenerator>  {
     public:
-        static PassRefPtr<ProfileGenerator> create(ExecState*, const WTF::String& title, unsigned uid, PassRefPtr<Stopwatch>);
+        static Ref<ProfileGenerator> create(ExecState*, const WTF::String& title, unsigned uid, PassRefPtr<Stopwatch>);
 
         // Members
         const WTF::String& title() const;

Modified: trunk/Source/_javascript_Core/profiler/ProfileNode.h (185345 => 185346)


--- trunk/Source/_javascript_Core/profiler/ProfileNode.h	2015-06-09 00:47:25 UTC (rev 185345)
+++ trunk/Source/_javascript_Core/profiler/ProfileNode.h	2015-06-09 02:17:48 UTC (rev 185346)
@@ -44,14 +44,14 @@
 
     class ProfileNode : public RefCounted<ProfileNode> {
     public:
-        static PassRefPtr<ProfileNode> create(ExecState* callerCallFrame, const CallIdentifier& callIdentifier, ProfileNode* parentNode)
+        static Ref<ProfileNode> create(ExecState* callerCallFrame, const CallIdentifier& callIdentifier, ProfileNode* parentNode)
         {
-            return adoptRef(new ProfileNode(callerCallFrame, callIdentifier, parentNode));
+            return adoptRef(*new ProfileNode(callerCallFrame, callIdentifier, parentNode));
         }
 
-        static PassRefPtr<ProfileNode> create(ExecState* callerCallFrame, ProfileNode* node)
+        static Ref<ProfileNode> create(ExecState* callerCallFrame, ProfileNode* node)
         {
-            return adoptRef(new ProfileNode(callerCallFrame, node));
+            return adoptRef(*new ProfileNode(callerCallFrame, node));
         }
 
         struct Call {

Modified: trunk/Source/_javascript_Core/runtime/DataView.cpp (185345 => 185346)


--- trunk/Source/_javascript_Core/runtime/DataView.cpp	2015-06-09 00:47:25 UTC (rev 185345)
+++ trunk/Source/_javascript_Core/runtime/DataView.cpp	2015-06-09 02:17:48 UTC (rev 185346)
@@ -37,13 +37,13 @@
 {
 }
 
-PassRefPtr<DataView> DataView::create(
+Ref<DataView> DataView::create(
     PassRefPtr<ArrayBuffer> buffer, unsigned byteOffset, unsigned byteLength)
 {
-    return adoptRef(new DataView(buffer, byteOffset, byteLength));
+    return adoptRef(*new DataView(buffer, byteOffset, byteLength));
 }
 
-PassRefPtr<DataView> DataView::create(PassRefPtr<ArrayBuffer> passedBuffer)
+Ref<DataView> DataView::create(PassRefPtr<ArrayBuffer> passedBuffer)
 {
     RefPtr<ArrayBuffer> buffer = passedBuffer;
     return create(buffer, 0, buffer->byteLength());

Modified: trunk/Source/_javascript_Core/runtime/DataView.h (185345 => 185346)


--- trunk/Source/_javascript_Core/runtime/DataView.h	2015-06-09 00:47:25 UTC (rev 185345)
+++ trunk/Source/_javascript_Core/runtime/DataView.h	2015-06-09 02:17:48 UTC (rev 185346)
@@ -37,8 +37,8 @@
     DataView(PassRefPtr<ArrayBuffer>, unsigned byteOffset, unsigned byteLength);
     
 public:
-    JS_EXPORT_PRIVATE static PassRefPtr<DataView> create(PassRefPtr<ArrayBuffer>, unsigned byteOffset, unsigned length);
-    static PassRefPtr<DataView> create(PassRefPtr<ArrayBuffer>);
+    JS_EXPORT_PRIVATE static Ref<DataView> create(PassRefPtr<ArrayBuffer>, unsigned byteOffset, unsigned length);
+    static Ref<DataView> create(PassRefPtr<ArrayBuffer>);
     
     virtual unsigned byteLength() const override
     {

Modified: trunk/Source/_javascript_Core/runtime/DateInstanceCache.h (185345 => 185346)


--- trunk/Source/_javascript_Core/runtime/DateInstanceCache.h	2015-06-09 00:47:25 UTC (rev 185345)
+++ trunk/Source/_javascript_Core/runtime/DateInstanceCache.h	2015-06-09 02:17:48 UTC (rev 185346)
@@ -37,7 +37,7 @@
 
 class DateInstanceData : public RefCounted<DateInstanceData> {
 public:
-    static PassRefPtr<DateInstanceData> create() { return adoptRef(new DateInstanceData); }
+    static Ref<DateInstanceData> create() { return adoptRef(*new DateInstanceData); }
 
     double m_gregorianDateTimeCachedForMS;
     GregorianDateTime m_cachedGregorianDateTime;

Modified: trunk/Source/_javascript_Core/runtime/JSPromiseReaction.cpp (185345 => 185346)


--- trunk/Source/_javascript_Core/runtime/JSPromiseReaction.cpp	2015-06-09 00:47:25 UTC (rev 185345)
+++ trunk/Source/_javascript_Core/runtime/JSPromiseReaction.cpp	2015-06-09 02:17:48 UTC (rev 185346)
@@ -59,9 +59,9 @@
     Strong<Unknown> m_argument;
 };
 
-PassRefPtr<Microtask> createExecutePromiseReactionMicrotask(VM& vm, JSPromiseReaction* reaction, JSValue argument)
+Ref<Microtask> createExecutePromiseReactionMicrotask(VM& vm, JSPromiseReaction* reaction, JSValue argument)
 {
-    return adoptRef(new ExecutePromiseReactionMicrotask(vm, reaction, argument));
+    return adoptRef(*new ExecutePromiseReactionMicrotask(vm, reaction, argument));
 }
 
 void ExecutePromiseReactionMicrotask::run(ExecState* exec)

Modified: trunk/Source/_javascript_Core/runtime/JSPromiseReaction.h (185345 => 185346)


--- trunk/Source/_javascript_Core/runtime/JSPromiseReaction.h	2015-06-09 00:47:25 UTC (rev 185345)
+++ trunk/Source/_javascript_Core/runtime/JSPromiseReaction.h	2015-06-09 02:17:48 UTC (rev 185346)
@@ -61,7 +61,7 @@
     WriteBarrier<Unknown> m_handler;
 };
 
-PassRefPtr<Microtask> createExecutePromiseReactionMicrotask(VM&, JSPromiseReaction*, JSValue);
+Ref<Microtask> createExecutePromiseReactionMicrotask(VM&, JSPromiseReaction*, JSValue);
 
 } // namespace JSC
 

Modified: trunk/Source/_javascript_Core/runtime/PropertyNameArray.h (185345 => 185346)


--- trunk/Source/_javascript_Core/runtime/PropertyNameArray.h	2015-06-09 00:47:25 UTC (rev 185345)
+++ trunk/Source/_javascript_Core/runtime/PropertyNameArray.h	2015-06-09 02:17:48 UTC (rev 185346)
@@ -33,7 +33,7 @@
 public:
     typedef Vector<Identifier, 20> PropertyNameVector;
 
-    static PassRefPtr<PropertyNameArrayData> create() { return adoptRef(new PropertyNameArrayData); }
+    static Ref<PropertyNameArrayData> create() { return adoptRef(*new PropertyNameArrayData); }
 
     PropertyNameVector& propertyNameVector() { return m_propertyNameVector; }
 

Modified: trunk/Source/_javascript_Core/runtime/TypeSet.h (185345 => 185346)


--- trunk/Source/_javascript_Core/runtime/TypeSet.h	2015-06-09 00:47:25 UTC (rev 185345)
+++ trunk/Source/_javascript_Core/runtime/TypeSet.h	2015-06-09 02:17:48 UTC (rev 185346)
@@ -53,7 +53,7 @@
 public:
     StructureShape();
 
-    static PassRefPtr<StructureShape> create() { return adoptRef(new StructureShape); }
+    static Ref<StructureShape> create() { return adoptRef(*new StructureShape); }
     String propertyHash();
     void markAsFinal();
     void addProperty(UniquedStringImpl&);
@@ -82,7 +82,7 @@
 class TypeSet : public RefCounted<TypeSet> {
 
 public:
-    static PassRefPtr<TypeSet> create() { return adoptRef(new TypeSet); }
+    static Ref<TypeSet> create() { return adoptRef(*new TypeSet); }
     TypeSet();
     void addTypeInformation(RuntimeType, PassRefPtr<StructureShape>, Structure*);
     void invalidateCache();

Modified: trunk/Source/_javascript_Core/runtime/TypedArrayBase.h (185345 => 185346)


--- trunk/Source/_javascript_Core/runtime/TypedArrayBase.h	2015-06-09 00:47:25 UTC (rev 185345)
+++ trunk/Source/_javascript_Core/runtime/TypedArrayBase.h	2015-06-09 02:17:48 UTC (rev 185346)
@@ -108,26 +108,26 @@
     }
 
     template <class Subclass>
-    static PassRefPtr<Subclass> create(PassRefPtr<ArrayBuffer> buffer, unsigned byteOffset, unsigned length)
+    static RefPtr<Subclass> create(PassRefPtr<ArrayBuffer> buffer, unsigned byteOffset, unsigned length)
     {
         RefPtr<ArrayBuffer> buf(buffer);
         if (!verifySubRange<T>(buf, byteOffset, length))
-            return 0;
+            return nullptr;
 
         return adoptRef(new Subclass(buf.release(), byteOffset, length));
     }
 
     template <class Subclass>
-    static PassRefPtr<Subclass> createUninitialized(unsigned length)
+    static RefPtr<Subclass> createUninitialized(unsigned length)
     {
         RefPtr<ArrayBuffer> buffer = ArrayBuffer::createUninitialized(length, sizeof(T));
         if (!buffer.get())
-            return 0;
+            return nullptr;
         return create<Subclass>(buffer.release(), 0, length);
     }
 
     template <class Subclass>
-    PassRefPtr<Subclass> subarrayImpl(int start, int end) const
+    RefPtr<Subclass> subarrayImpl(int start, int end) const
     {
         unsigned offset, length;
         calculateOffsetAndLength(start, end, m_length, &offset, &length);

Modified: trunk/Source/_javascript_Core/runtime/VM.cpp (185345 => 185346)


--- trunk/Source/_javascript_Core/runtime/VM.cpp	2015-06-09 00:47:25 UTC (rev 185345)
+++ trunk/Source/_javascript_Core/runtime/VM.cpp	2015-06-09 02:17:48 UTC (rev 185346)
@@ -340,17 +340,17 @@
 #endif
 }
 
-PassRefPtr<VM> VM::createContextGroup(HeapType heapType)
+Ref<VM> VM::createContextGroup(HeapType heapType)
 {
-    return adoptRef(new VM(APIContextGroup, heapType));
+    return adoptRef(*new VM(APIContextGroup, heapType));
 }
 
-PassRefPtr<VM> VM::create(HeapType heapType)
+Ref<VM> VM::create(HeapType heapType)
 {
-    return adoptRef(new VM(Default, heapType));
+    return adoptRef(*new VM(Default, heapType));
 }
 
-PassRefPtr<VM> VM::createLeaked(HeapType heapType)
+Ref<VM> VM::createLeaked(HeapType heapType)
 {
     return create(heapType);
 }

Modified: trunk/Source/_javascript_Core/runtime/VM.h (185345 => 185346)


--- trunk/Source/_javascript_Core/runtime/VM.h	2015-06-09 00:47:25 UTC (rev 185345)
+++ trunk/Source/_javascript_Core/runtime/VM.h	2015-06-09 02:17:48 UTC (rev 185346)
@@ -213,9 +213,9 @@
     JS_EXPORT_PRIVATE static bool sharedInstanceExists();
     JS_EXPORT_PRIVATE static VM& sharedInstance();
 
-    JS_EXPORT_PRIVATE static PassRefPtr<VM> create(HeapType = SmallHeap);
-    JS_EXPORT_PRIVATE static PassRefPtr<VM> createLeaked(HeapType = SmallHeap);
-    static PassRefPtr<VM> createContextGroup(HeapType = SmallHeap);
+    JS_EXPORT_PRIVATE static Ref<VM> create(HeapType = SmallHeap);
+    JS_EXPORT_PRIVATE static Ref<VM> createLeaked(HeapType = SmallHeap);
+    static Ref<VM> createContextGroup(HeapType = SmallHeap);
     JS_EXPORT_PRIVATE ~VM();
 
 private:

Modified: trunk/Source/_javascript_Core/testRegExp.cpp (185345 => 185346)


--- trunk/Source/_javascript_Core/testRegExp.cpp	2015-06-09 00:47:25 UTC (rev 185345)
+++ trunk/Source/_javascript_Core/testRegExp.cpp	2015-06-09 02:17:48 UTC (rev 185346)
@@ -519,7 +519,7 @@
 
 int realMain(int argc, char** argv)
 {
-    VM* vm = VM::create(LargeHeap).leakRef();
+    VM* vm = &VM::create(LargeHeap).leakRef();
     JSLockHolder locker(vm);
 
     CommandLine options;

Modified: trunk/Source/_javascript_Core/yarr/RegularExpression.cpp (185345 => 185346)


--- trunk/Source/_javascript_Core/yarr/RegularExpression.cpp	2015-06-09 00:47:25 UTC (rev 185345)
+++ trunk/Source/_javascript_Core/yarr/RegularExpression.cpp	2015-06-09 02:17:48 UTC (rev 185346)
@@ -37,9 +37,9 @@
 
 class RegularExpression::Private : public RefCounted<RegularExpression::Private> {
 public:
-    static PassRefPtr<Private> create(const String& pattern, TextCaseSensitivity caseSensitivity, MultilineMode multilineMode)
+    static Ref<Private> create(const String& pattern, TextCaseSensitivity caseSensitivity, MultilineMode multilineMode)
     {
-        return adoptRef(new Private(pattern, caseSensitivity, multilineMode));
+        return adoptRef(*new Private(pattern, caseSensitivity, multilineMode));
     }
 
     int lastMatchLength;

Modified: trunk/Source/WebCore/ChangeLog (185345 => 185346)


--- trunk/Source/WebCore/ChangeLog	2015-06-09 00:47:25 UTC (rev 185345)
+++ trunk/Source/WebCore/ChangeLog	2015-06-09 02:17:48 UTC (rev 185346)
@@ -1,3 +1,17 @@
+2015-06-08  Gyuyoung Kim  <[email protected]>
+
+        Purge PassRefPtr in _javascript_Core
+        https://bugs.webkit.org/show_bug.cgi?id=145750
+
+        Reviewed by Darin Adler.
+
+        As a step to purge PassRefPtr, this patch replaces PassRefPtr with Ref or RefPtr.
+
+        No new tests, no behavior changes.
+
+        * bindings/js/JSDOMWindowBase.cpp:
+        (WebCore::JSDOMWindowBase::commonVM):
+
 2015-06-08  Zalan Bujtas  <[email protected]>
 
         Subpixel rendering: Clip-path does not work properly on subpixel positions.

Modified: trunk/Source/WebCore/bindings/js/JSDOMWindowBase.cpp (185345 => 185346)


--- trunk/Source/WebCore/bindings/js/JSDOMWindowBase.cpp	2015-06-09 00:47:25 UTC (rev 185345)
+++ trunk/Source/WebCore/bindings/js/JSDOMWindowBase.cpp	2015-06-09 02:17:48 UTC (rev 185346)
@@ -201,7 +201,7 @@
     static VM* vm = nullptr;
     if (!vm) {
         ScriptController::initializeThreading();
-        vm = VM::createLeaked(LargeHeap).leakRef();
+        vm = &VM::createLeaked(LargeHeap).leakRef();
 #if !PLATFORM(IOS)
         vm->setExclusiveThread(std::this_thread::get_id());
 #else
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to