tools/profiler/JSAObjectBuilder.h
author Ben Turner <bent.mozilla@gmail.com>
Sat, 09 Feb 2013 17:59:47 +0000
changeset 121507 ad49bd35d558686f74d72f86717878117636da59
parent 114614 b130bb991d84db729555ad5b837dc3c5eb1a74a7
permissions -rw-r--r--
Bug 835698 - 'Pre-open() and send the fd for app process's application.zip'. r=jduell.

/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* 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/. */

#ifndef JSAOBJECTBUILDER_H
#define JSAOBJECTBUILDER_H

class JSCustomObject;
class JSCustomArray;
class nsAString;

class JSAObjectBuilder
{
public:
  virtual ~JSAObjectBuilder() = 0;

  virtual void DefineProperty(JSCustomObject *aObject, const char *name, JSCustomObject *aValue) = 0;
  virtual void DefineProperty(JSCustomObject *aObject, const char *name, JSCustomArray *aValue) = 0;
  virtual void DefineProperty(JSCustomObject *aObject, const char *name, int value) = 0;
  virtual void DefineProperty(JSCustomObject *aObject, const char *name, double value) = 0;
  virtual void DefineProperty(JSCustomObject *aObject, const char *name, const char *value) = 0;
  virtual void ArrayPush(JSCustomArray *aArray, int value) = 0;
  virtual void ArrayPush(JSCustomArray *aArray, const char *value) = 0;
  virtual void ArrayPush(JSCustomArray *aArray, JSCustomObject *aObject) = 0;
  virtual JSCustomArray  *CreateArray() = 0;
  virtual JSCustomObject *CreateObject() = 0;
};

#endif