Line data Source code
1 : /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
2 : /* vim: set ts=8 sts=2 et sw=2 tw=80: */
3 : /* This Source Code Form is subject to the terms of the Mozilla Public
4 : * License, v. 2.0. If a copy of the MPL was not distributed with this
5 : * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
6 :
7 : #include "TimeoutHandler.h"
8 : #include "nsJSUtils.h"
9 :
10 : namespace mozilla {
11 : namespace dom {
12 :
13 2 : TimeoutHandler::TimeoutHandler(JSContext* aCx)
14 2 : : TimeoutHandler()
15 : {
16 2 : nsJSUtils::GetCallingLocation(aCx, mFileName, &mLineNo, &mColumn);
17 2 : }
18 :
19 : nsresult
20 0 : TimeoutHandler::Call()
21 : {
22 0 : return NS_OK;
23 : }
24 :
25 : void
26 2 : TimeoutHandler::GetLocation(const char** aFileName, uint32_t* aLineNo,
27 : uint32_t* aColumn)
28 : {
29 2 : *aFileName = mFileName.get();
30 2 : *aLineNo = mLineNo;
31 2 : *aColumn = mColumn;
32 2 : }
33 :
34 0 : NS_IMPL_CYCLE_COLLECTION_0(TimeoutHandler)
35 :
36 11 : NS_IMPL_CYCLE_COLLECTING_ADDREF(TimeoutHandler)
37 8 : NS_IMPL_CYCLE_COLLECTING_RELEASE(TimeoutHandler)
38 :
39 6 : NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION(TimeoutHandler)
40 6 : NS_INTERFACE_MAP_ENTRY(nsITimeoutHandler)
41 1 : NS_INTERFACE_MAP_END
42 :
43 : } // namespace dom
44 9 : } // namespace mozilla
|