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 #ifndef vm_ToSource_h 8 #define vm_ToSource_h 9 10 #include "jstypes.h" // JS_PUBLIC_API 11 12 #include "js/RootingAPI.h" // JS::Handle 13 #include "js/Value.h" // JS::Value 14 15 struct JS_PUBLIC_API JSContext; 16 class JS_PUBLIC_API JSString; 17 18 namespace js { 19 20 // Try to convert a value to its source expression, returning null after 21 // reporting an error, otherwise returning a new string. 22 extern JSString* ValueToSource(JSContext* cx, JS::Handle<JS::Value> v); 23 24 } // namespace js 25 26 #endif // vm_ToSource_h 27