Skip to content

Commit

Permalink
Backed out 2 changesets (bug 514280) for OSX build bustage on a CLOSE…
Browse files Browse the repository at this point in the history
…D TREE

Backed out changeset 2a015b45d808 (bug 514280)
Backed out changeset a01f97c1ed02 (bug 514280)
  • Loading branch information
KWierso committed Mar 17, 2014
1 parent 40c2259 commit 76f8b50
Show file tree
Hide file tree
Showing 50 changed files with 99 additions and 100 deletions.
2 changes: 1 addition & 1 deletion content/canvas/src/DocumentRendererChild.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ DocumentRendererChild::RenderDocument(nsIDOMWindow *window,
if (flushLayout)
nsContentUtils::FlushLayoutForTree(window);

nsRefPtr<nsPresContext> presContext;
nsCOMPtr<nsPresContext> presContext;
nsCOMPtr<nsPIDOMWindow> win = do_QueryInterface(window);
if (win) {
nsIDocShell* docshell = win->GetDocShell();
Expand Down
2 changes: 1 addition & 1 deletion content/media/MediaDecoder.h
Original file line number Diff line number Diff line change
Expand Up @@ -1025,7 +1025,7 @@ class MediaDecoder : public nsIObserver,
// is synchronised on a monitor. The lifetime of this object is
// after mPlayState is LOADING and before mPlayState is SHUTDOWN. It
// is safe to access it during this period.
nsRefPtr<MediaDecoderStateMachine> mDecoderStateMachine;
nsCOMPtr<MediaDecoderStateMachine> mDecoderStateMachine;

// Media data resource.
nsRefPtr<MediaResource> mResource;
Expand Down
4 changes: 2 additions & 2 deletions content/media/MediaDecoderStateMachine.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2060,7 +2060,7 @@ class nsDecoderDisposeEvent : public nsRunnable {
}
private:
nsRefPtr<MediaDecoder> mDecoder;
nsRefPtr<MediaDecoderStateMachine> mStateMachine;
nsCOMPtr<MediaDecoderStateMachine> mStateMachine;
};

// Runnable which dispatches an event to the main thread to dispose of the
Expand All @@ -2079,7 +2079,7 @@ class nsDispatchDisposeEvent : public nsRunnable {
}
private:
nsRefPtr<MediaDecoder> mDecoder;
nsRefPtr<MediaDecoderStateMachine> mStateMachine;
nsCOMPtr<MediaDecoderStateMachine> mStateMachine;
};

nsresult MediaDecoderStateMachine::RunStateMachine()
Expand Down
2 changes: 1 addition & 1 deletion content/media/plugins/MediaPluginHost.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ namespace mozilla {
class MediaPluginReader;

class MediaPluginHost {
nsRefPtr<MediaResourceServer> mResourceServer;
nsCOMPtr<MediaResourceServer> mResourceServer;
nsTArray<MPAPI::Manifest *> mPlugins;

MPAPI::Manifest *FindPlugin(const nsACString& aMimeType);
Expand Down
6 changes: 3 additions & 3 deletions content/media/plugins/MediaResourceServer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ class ServeResourceEvent : public nsRunnable {

// The MediaResourceServer that owns the MediaResource instances
// served. This is used to lookup the MediaResource from the URL.
nsRefPtr<MediaResourceServer> mServer;
nsCOMPtr<MediaResourceServer> mServer;

// Write 'aBufferLength' bytes from 'aBuffer' to 'mOutput'. This
// method ensures all the data is written by checking the number
Expand Down Expand Up @@ -342,7 +342,7 @@ class ResourceSocketListener : public nsIServerSocketListener
public:
// The MediaResourceServer used to look up the MediaResource
// on requests.
nsRefPtr<MediaResourceServer> mServer;
nsCOMPtr<MediaResourceServer> mServer;

public:
NS_DECL_THREADSAFE_ISUPPORTS
Expand Down Expand Up @@ -416,7 +416,7 @@ MediaResourceServer::Run()
already_AddRefed<MediaResourceServer>
MediaResourceServer::Start()
{
nsRefPtr<MediaResourceServer> server = new MediaResourceServer();
nsCOMPtr<MediaResourceServer> server = new MediaResourceServer();
NS_DispatchToMainThread(server, NS_DISPATCH_SYNC);
return server.forget();
}
Expand Down
2 changes: 1 addition & 1 deletion content/media/webaudio/AudioContext.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -460,7 +460,7 @@ AudioContext::DecodeAudioData(const ArrayBuffer& aBuffer,
aBuffer.Data(), aBuffer.Length(),
contentType);

nsRefPtr<DecodeErrorCallback> failureCallback;
nsCOMPtr<DecodeErrorCallback> failureCallback;
if (aFailureCallback.WasPassed()) {
failureCallback = &aFailureCallback.Value();
}
Expand Down
2 changes: 1 addition & 1 deletion content/xml/document/src/nsXMLContentSink.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,7 @@ nsXMLContentSink::MaybePrettyPrint()
mCSSLoader->SetEnabled(true);
}

nsRefPtr<nsXMLPrettyPrinter> printer;
nsCOMPtr<nsXMLPrettyPrinter> printer;
nsresult rv = NS_NewXMLPrettyPrinter(getter_AddRefs(printer));
NS_ENSURE_SUCCESS(rv, rv);

Expand Down
2 changes: 1 addition & 1 deletion content/xul/templates/src/nsXULTemplateQueryProcessorRDF.h
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ class nsXULTemplateQueryProcessorRDF MOZ_FINAL : public nsIXULTemplateQueryProce
public nsIRDFObserver
{
public:
typedef nsTArray<nsRefPtr<nsXULTemplateResultRDF> > ResultArray;
typedef nsTArray<nsCOMPtr<nsXULTemplateResultRDF> > ResultArray;

nsXULTemplateQueryProcessorRDF();

Expand Down
2 changes: 1 addition & 1 deletion dom/base/Navigator.h
Original file line number Diff line number Diff line change
Expand Up @@ -338,7 +338,7 @@ class Navigator : public nsIDOMNavigator
nsRefPtr<Voicemail> mVoicemail;
#endif
#ifdef MOZ_B2G_BT
nsRefPtr<bluetooth::BluetoothManager> mBluetooth;
nsCOMPtr<bluetooth::BluetoothManager> mBluetooth;
#endif
#ifdef MOZ_AUDIO_CHANNEL_MANAGER
nsRefPtr<system::AudioChannelManager> mAudioChannelManager;
Expand Down
2 changes: 1 addition & 1 deletion dom/base/nsContentPermissionHelper.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ class ContentPermissionRequestParent : public PContentPermissionRequestParent

nsCOMPtr<nsIPrincipal> mPrincipal;
nsCOMPtr<Element> mElement;
nsRefPtr<nsContentPermissionRequestProxy> mProxy;
nsCOMPtr<nsContentPermissionRequestProxy> mProxy;
nsTArray<PermissionRequest> mRequests;

private:
Expand Down
2 changes: 1 addition & 1 deletion dom/base/nsGlobalWindow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5033,7 +5033,7 @@ nsGlobalWindow::GetDevicePixelRatio(ErrorResult& aError)
return 1.0;
}

nsRefPtr<nsPresContext> presContext;
nsCOMPtr<nsPresContext> presContext;
mDocShell->GetPresContext(getter_AddRefs(presContext));
if (!presContext) {
return 1.0;
Expand Down
40 changes: 20 additions & 20 deletions dom/camera/DOMCameraControl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -613,7 +613,7 @@ nsDOMCameraControl::SensorAngle()
already_AddRefed<CameraShutterCallback>
nsDOMCameraControl::GetOnShutter()
{
nsRefPtr<CameraShutterCallback> cb = mOnShutterCb;
nsCOMPtr<CameraShutterCallback> cb = mOnShutterCb;
return cb.forget();
}

Expand All @@ -627,7 +627,7 @@ nsDOMCameraControl::SetOnShutter(CameraShutterCallback* aCb)
already_AddRefed<CameraClosedCallback>
nsDOMCameraControl::GetOnClosed()
{
nsRefPtr<CameraClosedCallback> onClosed = mOnClosedCb;
nsCOMPtr<CameraClosedCallback> onClosed = mOnClosedCb;
return onClosed.forget();
}

Expand All @@ -640,7 +640,7 @@ nsDOMCameraControl::SetOnClosed(CameraClosedCallback* aCb)
already_AddRefed<CameraRecorderStateChange>
nsDOMCameraControl::GetOnRecorderStateChange()
{
nsRefPtr<CameraRecorderStateChange> cb = mOnRecorderStateChangeCb;
nsCOMPtr<CameraRecorderStateChange> cb = mOnRecorderStateChangeCb;
return cb.forget();
}

Expand All @@ -654,7 +654,7 @@ nsDOMCameraControl::SetOnRecorderStateChange(CameraRecorderStateChange* aCb)
already_AddRefed<CameraPreviewStateChange>
nsDOMCameraControl::GetOnPreviewStateChange()
{
nsRefPtr<CameraPreviewStateChange> cb = mOnPreviewStateChangeCb;
nsCOMPtr<CameraPreviewStateChange> cb = mOnPreviewStateChangeCb;
return cb.forget();
}
void
Expand Down Expand Up @@ -783,7 +783,7 @@ nsDOMCameraControl::SetConfiguration(const CameraConfiguration& aConfiguration,
{
MOZ_ASSERT(mCameraControl);

nsRefPtr<CameraTakePictureCallback> cb = mTakePictureOnSuccessCb;
nsCOMPtr<CameraTakePictureCallback> cb = mTakePictureOnSuccessCb;
if (cb) {
// We're busy taking a picture, can't change modes right now.
if (aOnError.WasPassed()) {
Expand Down Expand Up @@ -822,12 +822,12 @@ nsDOMCameraControl::AutoFocus(CameraAutoFocusCallback& aOnSuccess,
{
MOZ_ASSERT(mCameraControl);

nsRefPtr<CameraAutoFocusCallback> cb = mAutoFocusOnSuccessCb.forget();
nsCOMPtr<CameraAutoFocusCallback> cb = mAutoFocusOnSuccessCb.forget();
bool cancel = false;
if (cb) {
// we have a callback, which means we're already in the process of
// auto-focusing--cancel the old callback
nsRefPtr<CameraErrorCallback> ecb = mAutoFocusOnErrorCb.forget();
nsCOMPtr<CameraErrorCallback> ecb = mAutoFocusOnErrorCb.forget();
if (ecb) {
ErrorResult ignored;
ecb->Call(NS_LITERAL_STRING("Interrupted"), ignored);
Expand All @@ -852,7 +852,7 @@ nsDOMCameraControl::TakePicture(const CameraPictureOptions& aOptions,
{
MOZ_ASSERT(mCameraControl);

nsRefPtr<CameraTakePictureCallback> cb = mTakePictureOnSuccessCb;
nsCOMPtr<CameraTakePictureCallback> cb = mTakePictureOnSuccessCb;
if (cb) {
// There is already a call to TakePicture() in progress, abort this one and
// invoke the error callback (if one was passed in).
Expand Down Expand Up @@ -971,7 +971,7 @@ nsDOMCameraControl::OnHardwareStateChange(CameraControlListener::HardwareState a
// The hardware is open, so we can return a camera to JS, even if
// the preview hasn't started yet.
if (mGetCameraOnSuccessCb) {
nsRefPtr<GetCameraCallback> cb = mGetCameraOnSuccessCb.forget();
nsCOMPtr<GetCameraCallback> cb = mGetCameraOnSuccessCb.forget();
ErrorResult ignored;
mGetCameraOnErrorCb = nullptr;
cb->Call(*this, *mCurrentConfiguration, ignored);
Expand All @@ -981,12 +981,12 @@ nsDOMCameraControl::OnHardwareStateChange(CameraControlListener::HardwareState a
case CameraControlListener::kHardwareClosed:
if (mReleaseOnSuccessCb) {
// If we have this event handler, this was a solicited hardware close.
nsRefPtr<CameraReleaseCallback> cb = mReleaseOnSuccessCb.forget();
nsCOMPtr<CameraReleaseCallback> cb = mReleaseOnSuccessCb.forget();
mReleaseOnErrorCb = nullptr;
cb->Call(ignored);
} else if(mOnClosedCb) {
// If not, something else closed the hardware.
nsRefPtr<CameraClosedCallback> cb = mOnClosedCb;
nsCOMPtr<CameraClosedCallback> cb = mOnClosedCb;
cb->Call(ignored);
}
break;
Expand All @@ -1003,7 +1003,7 @@ nsDOMCameraControl::OnShutter()

DOM_CAMERA_LOGI("DOM ** SNAP **\n");

nsRefPtr<CameraShutterCallback> cb = mOnShutterCb;
nsCOMPtr<CameraShutterCallback> cb = mOnShutterCb;
if (cb) {
ErrorResult ignored;
cb->Call(ignored);
Expand All @@ -1030,7 +1030,7 @@ nsDOMCameraControl::OnPreviewStateChange(CameraControlListener::PreviewState aSt
break;
}

nsRefPtr<CameraPreviewStateChange> cb = mOnPreviewStateChangeCb;
nsCOMPtr<CameraPreviewStateChange> cb = mOnPreviewStateChangeCb;
ErrorResult ignored;
cb->Call(state, ignored);
}
Expand All @@ -1048,7 +1048,7 @@ nsDOMCameraControl::OnRecorderStateChange(CameraControlListener::RecorderState a
switch (aState) {
case CameraControlListener::kRecorderStarted:
if (mStartRecordingOnSuccessCb) {
nsRefPtr<CameraStartRecordingCallback> cb = mStartRecordingOnSuccessCb.forget();
nsCOMPtr<CameraStartRecordingCallback> cb = mStartRecordingOnSuccessCb.forget();
mStartRecordingOnErrorCb = nullptr;
cb->Call(ignored);
}
Expand Down Expand Up @@ -1091,7 +1091,7 @@ nsDOMCameraControl::OnRecorderStateChange(CameraControlListener::RecorderState a
return;
}

nsRefPtr<CameraRecorderStateChange> cb = mOnRecorderStateChangeCb;
nsCOMPtr<CameraRecorderStateChange> cb = mOnRecorderStateChangeCb;
if (cb) {
cb->Call(state, ignored);
}
Expand All @@ -1117,7 +1117,7 @@ nsDOMCameraControl::OnConfigurationChange(DOMCameraConfiguration* aConfiguration
DOM_CAMERA_LOGI(" recorder profile : %s\n",
NS_ConvertUTF16toUTF8(mCurrentConfiguration->mRecorderProfile).get());

nsRefPtr<CameraSetConfigurationCallback> cb = mSetConfigurationOnSuccessCb.forget();
nsCOMPtr<CameraSetConfigurationCallback> cb = mSetConfigurationOnSuccessCb.forget();
mSetConfigurationOnErrorCb = nullptr;
if (cb) {
ErrorResult ignored;
Expand All @@ -1130,7 +1130,7 @@ nsDOMCameraControl::OnAutoFocusComplete(bool aAutoFocusSucceeded)
{
MOZ_ASSERT(NS_IsMainThread());

nsRefPtr<CameraAutoFocusCallback> cb = mAutoFocusOnSuccessCb.forget();
nsCOMPtr<CameraAutoFocusCallback> cb = mAutoFocusOnSuccessCb.forget();
mAutoFocusOnErrorCb = nullptr;
if (cb) {
ErrorResult ignored;
Expand All @@ -1143,7 +1143,7 @@ nsDOMCameraControl::OnTakePictureComplete(nsIDOMBlob* aPicture)
{
MOZ_ASSERT(NS_IsMainThread());

nsRefPtr<CameraTakePictureCallback> cb = mTakePictureOnSuccessCb.forget();
nsCOMPtr<CameraTakePictureCallback> cb = mTakePictureOnSuccessCb.forget();
mTakePictureOnErrorCb = nullptr;
if (!cb) {
// Warn because it shouldn't be possible to get here without
Expand All @@ -1164,7 +1164,7 @@ nsDOMCameraControl::OnError(CameraControlListener::CameraErrorContext aContext,
NS_LossyConvertUTF16toASCII(aError).get());
MOZ_ASSERT(NS_IsMainThread());

nsRefPtr<CameraErrorCallback>* errorCb;
nsCOMPtr<CameraErrorCallback>* errorCb;
switch (aContext) {
case CameraControlListener::kInStartCamera:
mGetCameraOnSuccessCb = nullptr;
Expand Down Expand Up @@ -1240,7 +1240,7 @@ nsDOMCameraControl::OnError(CameraControlListener::CameraErrorContext aContext,
}

// kung-fu death grip
nsRefPtr<CameraErrorCallback> cb = (*errorCb).forget();
nsCOMPtr<CameraErrorCallback> cb = (*errorCb).forget();
ErrorResult ignored;
cb->Call(aError, ignored);
}
Expand Down
32 changes: 16 additions & 16 deletions dom/camera/DOMCameraControl.h
Original file line number Diff line number Diff line change
Expand Up @@ -168,24 +168,24 @@ class nsDOMCameraControl MOZ_FINAL : public DOMMediaStream
nsRefPtr<dom::CameraCapabilities> mCapabilities;

// solicited camera control event handlers
nsRefPtr<dom::GetCameraCallback> mGetCameraOnSuccessCb;
nsRefPtr<dom::CameraErrorCallback> mGetCameraOnErrorCb;
nsRefPtr<dom::CameraAutoFocusCallback> mAutoFocusOnSuccessCb;
nsRefPtr<dom::CameraErrorCallback> mAutoFocusOnErrorCb;
nsRefPtr<dom::CameraTakePictureCallback> mTakePictureOnSuccessCb;
nsRefPtr<dom::CameraErrorCallback> mTakePictureOnErrorCb;
nsRefPtr<dom::CameraStartRecordingCallback> mStartRecordingOnSuccessCb;
nsRefPtr<dom::CameraErrorCallback> mStartRecordingOnErrorCb;
nsRefPtr<dom::CameraReleaseCallback> mReleaseOnSuccessCb;
nsRefPtr<dom::CameraErrorCallback> mReleaseOnErrorCb;
nsRefPtr<dom::CameraSetConfigurationCallback> mSetConfigurationOnSuccessCb;
nsRefPtr<dom::CameraErrorCallback> mSetConfigurationOnErrorCb;
nsCOMPtr<dom::GetCameraCallback> mGetCameraOnSuccessCb;
nsCOMPtr<dom::CameraErrorCallback> mGetCameraOnErrorCb;
nsCOMPtr<dom::CameraAutoFocusCallback> mAutoFocusOnSuccessCb;
nsCOMPtr<dom::CameraErrorCallback> mAutoFocusOnErrorCb;
nsCOMPtr<dom::CameraTakePictureCallback> mTakePictureOnSuccessCb;
nsCOMPtr<dom::CameraErrorCallback> mTakePictureOnErrorCb;
nsCOMPtr<dom::CameraStartRecordingCallback> mStartRecordingOnSuccessCb;
nsCOMPtr<dom::CameraErrorCallback> mStartRecordingOnErrorCb;
nsCOMPtr<dom::CameraReleaseCallback> mReleaseOnSuccessCb;
nsCOMPtr<dom::CameraErrorCallback> mReleaseOnErrorCb;
nsCOMPtr<dom::CameraSetConfigurationCallback> mSetConfigurationOnSuccessCb;
nsCOMPtr<dom::CameraErrorCallback> mSetConfigurationOnErrorCb;

// unsolicited event handlers
nsRefPtr<dom::CameraShutterCallback> mOnShutterCb;
nsRefPtr<dom::CameraClosedCallback> mOnClosedCb;
nsRefPtr<dom::CameraRecorderStateChange> mOnRecorderStateChangeCb;
nsRefPtr<dom::CameraPreviewStateChange> mOnPreviewStateChangeCb;
nsCOMPtr<dom::CameraShutterCallback> mOnShutterCb;
nsCOMPtr<dom::CameraClosedCallback> mOnClosedCb;
nsCOMPtr<dom::CameraRecorderStateChange> mOnRecorderStateChangeCb;
nsCOMPtr<dom::CameraPreviewStateChange> mOnPreviewStateChangeCb;

// Camera event listener; we only need this weak reference so that
// we can remove the listener from the camera when we're done
Expand Down
2 changes: 1 addition & 1 deletion dom/camera/DOMCameraManager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ nsDOMCameraManager::GetCamera(const nsAString& aCamera,
cameraId = 1;
}

nsRefPtr<CameraErrorCallback> errorCallback = nullptr;
nsCOMPtr<CameraErrorCallback> errorCallback = nullptr;
if (aOnError.WasPassed()) {
errorCallback = &aOnError.Value();
}
Expand Down
2 changes: 1 addition & 1 deletion dom/devicestorage/DeviceStorageRequestChild.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,7 @@ DeviceStorageRequestChild::
cursor->mFiles.AppendElement(dsf);
}

nsRefPtr<ContinueCursorEvent> event = new ContinueCursorEvent(cursor);
nsCOMPtr<ContinueCursorEvent> event = new ContinueCursorEvent(cursor);
event->Continue();
break;
}
Expand Down
4 changes: 2 additions & 2 deletions dom/ipc/ContentParent.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3329,7 +3329,7 @@ ContentParent::RecvAddIdleObserver(const uint64_t& aObserver, const uint32_t& aI
do_GetService("@mozilla.org/widget/idleservice;1", &rv);
NS_ENSURE_SUCCESS(rv, false);

nsRefPtr<ParentIdleListener> listener = new ParentIdleListener(this, aObserver);
nsCOMPtr<ParentIdleListener> listener = new ParentIdleListener(this, aObserver);
mIdleListeners.Put(aObserver, listener);
idleService->AddIdleObserver(listener, aIdleTimeInS);
return true;
Expand All @@ -3343,7 +3343,7 @@ ContentParent::RecvRemoveIdleObserver(const uint64_t& aObserver, const uint32_t&
do_GetService("@mozilla.org/widget/idleservice;1", &rv);
NS_ENSURE_SUCCESS(rv, false);

nsRefPtr<ParentIdleListener> listener;
nsCOMPtr<ParentIdleListener> listener;
bool found = mIdleListeners.Get(aObserver, &listener);
if (found) {
mIdleListeners.Remove(aObserver);
Expand Down
2 changes: 1 addition & 1 deletion dom/ipc/ContentParent.h
Original file line number Diff line number Diff line change
Expand Up @@ -585,7 +585,7 @@ class ContentParent : public PContentParent
nsRefPtr<nsConsoleService> mConsoleService;
nsConsoleService* GetConsoleService();

nsDataHashtable<nsUint64HashKey, nsRefPtr<ParentIdleListener> > mIdleListeners;
nsDataHashtable<nsUint64HashKey, nsCOMPtr<ParentIdleListener> > mIdleListeners;

#ifdef MOZ_X11
// Dup of child's X socket, used to scope its resources to this
Expand Down
2 changes: 1 addition & 1 deletion dom/plugins/base/nsNPAPIPluginInstance.h
Original file line number Diff line number Diff line change
Expand Up @@ -326,7 +326,7 @@ class nsNPAPIPluginInstance : public nsISupports

friend class PluginEventRunnable;

nsTArray<nsRefPtr<PluginEventRunnable>> mPostedEvents;
nsTArray<nsCOMPtr<PluginEventRunnable>> mPostedEvents;
void PopPostedEvent(PluginEventRunnable* r);
void OnSurfaceTextureFrameAvailable();

Expand Down
Loading

0 comments on commit 76f8b50

Please sign in to comment.