1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 07:08:10 +00:00

LibJS: Remove a bunch of unnecessary uses of Cell::interpreter()

We'll want to get rid of all uses of this, to free up the engine from
the old assumption that there's always an Interpreter available.
This commit is contained in:
Andreas Kling 2020-09-27 20:07:25 +02:00
parent 591b7b7031
commit 063acda76e
9 changed files with 13 additions and 21 deletions

View file

@ -24,7 +24,6 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#include <LibJS/Interpreter.h>
#include <LibJS/Runtime/Error.h>
#include <LibJS/Runtime/GlobalObject.h>
@ -32,8 +31,7 @@ namespace JS {
Error* Error::create(GlobalObject& global_object, const FlyString& name, const String& message)
{
auto& interpreter = global_object.interpreter();
return interpreter.heap().allocate<Error>(global_object, name, message, *global_object.error_prototype());
return global_object.heap().allocate<Error>(global_object, name, message, *global_object.error_prototype());
}
Error::Error(const FlyString& name, const String& message, Object& prototype)