mirror of
				https://github.com/RGBCube/serenity
				synced 2025-10-31 19:42:43 +00:00 
			
		
		
		
	LibJS: Use TRY(push_execution_context()) in places where we can recover
This commit is contained in:
		
							parent
							
								
									9422ae9bb2
								
							
						
					
					
						commit
						29964dc152
					
				
					 3 changed files with 4 additions and 4 deletions
				
			
		|  | @ -404,7 +404,7 @@ Completion SourceTextModule::initialize_environment(VM& vm) | |||
|     // Note: We're already working on that one.
 | ||||
| 
 | ||||
|     // 17. Push moduleContext onto the execution context stack; moduleContext is now the running execution context.
 | ||||
|     vm.push_execution_context(m_execution_context, realm().global_object()); | ||||
|     TRY(vm.push_execution_context(m_execution_context, realm().global_object())); | ||||
| 
 | ||||
|     // 18. Let code be module.[[ECMAScriptCode]].
 | ||||
| 
 | ||||
|  | @ -657,7 +657,7 @@ Completion SourceTextModule::execute_module(VM& vm, Optional<PromiseCapability> | |||
|         // a. Assert: capability is not present.
 | ||||
|         VERIFY(!capability.has_value()); | ||||
|         // b. Push moduleContext onto the execution context stack; moduleContext is now the running execution context.
 | ||||
|         vm.push_execution_context(module_context, realm().global_object()); | ||||
|         TRY(vm.push_execution_context(module_context, realm().global_object())); | ||||
| 
 | ||||
|         // c. Let result be the result of evaluating module.[[ECMAScriptCode]].
 | ||||
|         auto result = m_ecmascript_code->execute(vm.interpreter(), realm().global_object()); | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Linus Groh
						Linus Groh