2012-03-30 21:42:20 -07:00
|
|
|
/* -*- Mode: c++; c-basic-offset: 2; indent-tabs-mode: nil; tab-width: 40 -*- */
|
|
|
|
/* This Source Code Form is subject to the terms of the Mozilla Public
|
|
|
|
* License, v. 2.0. If a copy of the MPL was not distributed with this file,
|
|
|
|
* You can obtain one at http://mozilla.org/MPL/2.0/. */
|
|
|
|
|
|
|
|
#include "XMLHttpRequestUpload.h"
|
|
|
|
|
|
|
|
#include "XMLHttpRequest.h"
|
|
|
|
|
|
|
|
#include "DOMBindingInlines.h"
|
|
|
|
|
|
|
|
USING_WORKERS_NAMESPACE
|
|
|
|
|
|
|
|
// static
|
|
|
|
XMLHttpRequestUpload*
|
|
|
|
XMLHttpRequestUpload::Create(JSContext* aCx, XMLHttpRequest* aXHR)
|
|
|
|
{
|
|
|
|
nsRefPtr<XMLHttpRequestUpload> upload = new XMLHttpRequestUpload(aCx, aXHR);
|
|
|
|
return Wrap(aCx, NULL, upload) ? upload : NULL;
|
|
|
|
}
|
|
|
|
|
|
|
|
void
|
2012-04-26 13:57:33 -07:00
|
|
|
XMLHttpRequestUpload::_trace(JSTracer* aTrc)
|
2012-03-30 21:42:20 -07:00
|
|
|
{
|
|
|
|
if (mXHR) {
|
2013-03-26 15:10:34 -07:00
|
|
|
JS_CallObjectTracer(aTrc, mXHR->GetJSObject(), "mXHR");
|
2012-03-30 21:42:20 -07:00
|
|
|
}
|
2012-04-26 13:57:33 -07:00
|
|
|
XMLHttpRequestEventTarget::_trace(aTrc);
|
2012-03-30 21:42:20 -07:00
|
|
|
}
|
|
|
|
|
|
|
|
void
|
2012-04-26 13:57:33 -07:00
|
|
|
XMLHttpRequestUpload::_finalize(JSFreeOp* aFop)
|
2012-03-30 21:42:20 -07:00
|
|
|
{
|
2012-04-26 13:57:33 -07:00
|
|
|
XMLHttpRequestEventTarget::_finalize(aFop);
|
2012-03-30 21:42:20 -07:00
|
|
|
}
|