mirror of
				https://github.com/LadybirdBrowser/ladybird.git
				synced 2025-10-31 13:20:59 +00:00 
			
		
		
		
	LibJS+LibWeb+WebContent: Port JS::PropertyKey to UTF-16
This has quite a lot of fall out. But the majority of it is just type or UDL substitution, where the changes just fall through to other function calls. By changing property key storage to UTF-16, the main affected areas are: * NativeFunction names must now be UTF-16 * Bytecode identifiers must now be UTF-16 * Module/binding names must now be UTF-16
This commit is contained in:
		
							parent
							
								
									cd276235d7
								
							
						
					
					
						commit
						0efa98a57a
					
				
				
				Notes:
				
					github-actions[bot]
				
				2025-08-05 11:08:30 +00:00 
				
			
			Author: https://github.com/trflynn89
Commit: 0efa98a57a
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/5698
			
					 131 changed files with 766 additions and 726 deletions
				
			
		|  | @ -49,7 +49,7 @@ KeyAlgorithm::KeyAlgorithm(JS::Realm& realm) | |||
| 
 | ||||
| void KeyAlgorithm::initialize(JS::Realm& realm) | ||||
| { | ||||
|     define_native_accessor(realm, "name"_fly_string, name_getter, {}, JS::Attribute::Enumerable | JS::Attribute::Configurable); | ||||
|     define_native_accessor(realm, "name"_utf16_fly_string, name_getter, {}, JS::Attribute::Enumerable | JS::Attribute::Configurable); | ||||
|     Base::initialize(realm); | ||||
| } | ||||
| 
 | ||||
|  | @ -81,8 +81,8 @@ void RsaKeyAlgorithm::initialize(JS::Realm& realm) | |||
| { | ||||
|     Base::initialize(realm); | ||||
| 
 | ||||
|     define_native_accessor(realm, "modulusLength"_fly_string, modulus_length_getter, {}, JS::Attribute::Enumerable | JS::Attribute::Configurable); | ||||
|     define_native_accessor(realm, "publicExponent"_fly_string, public_exponent_getter, {}, JS::Attribute::Enumerable | JS::Attribute::Configurable); | ||||
|     define_native_accessor(realm, "modulusLength"_utf16_fly_string, modulus_length_getter, {}, JS::Attribute::Enumerable | JS::Attribute::Configurable); | ||||
|     define_native_accessor(realm, "publicExponent"_utf16_fly_string, public_exponent_getter, {}, JS::Attribute::Enumerable | JS::Attribute::Configurable); | ||||
| } | ||||
| 
 | ||||
| void RsaKeyAlgorithm::visit_edges(Visitor& visitor) | ||||
|  | @ -133,7 +133,7 @@ void EcKeyAlgorithm::initialize(JS::Realm& realm) | |||
| { | ||||
|     Base::initialize(realm); | ||||
| 
 | ||||
|     define_native_accessor(realm, "namedCurve"_fly_string, named_curve_getter, {}, JS::Attribute::Enumerable | JS::Attribute::Configurable); | ||||
|     define_native_accessor(realm, "namedCurve"_utf16_fly_string, named_curve_getter, {}, JS::Attribute::Enumerable | JS::Attribute::Configurable); | ||||
| } | ||||
| 
 | ||||
| JS_DEFINE_NATIVE_FUNCTION(EcKeyAlgorithm::named_curve_getter) | ||||
|  | @ -157,7 +157,7 @@ void RsaHashedKeyAlgorithm::initialize(JS::Realm& realm) | |||
| { | ||||
|     Base::initialize(realm); | ||||
| 
 | ||||
|     define_native_accessor(realm, "hash"_fly_string, hash_getter, {}, JS::Attribute::Enumerable | JS::Attribute::Configurable); | ||||
|     define_native_accessor(realm, "hash"_utf16_fly_string, hash_getter, {}, JS::Attribute::Enumerable | JS::Attribute::Configurable); | ||||
| } | ||||
| 
 | ||||
| JS_DEFINE_NATIVE_FUNCTION(RsaHashedKeyAlgorithm::hash_getter) | ||||
|  | @ -191,7 +191,7 @@ void AesKeyAlgorithm::initialize(JS::Realm& realm) | |||
| { | ||||
|     Base::initialize(realm); | ||||
| 
 | ||||
|     define_native_accessor(realm, "length"_fly_string, length_getter, {}, JS::Attribute::Enumerable | JS::Attribute::Configurable); | ||||
|     define_native_accessor(realm, "length"_utf16_fly_string, length_getter, {}, JS::Attribute::Enumerable | JS::Attribute::Configurable); | ||||
| } | ||||
| 
 | ||||
| JS_DEFINE_NATIVE_FUNCTION(AesKeyAlgorithm::length_getter) | ||||
|  | @ -214,8 +214,8 @@ HmacKeyAlgorithm::HmacKeyAlgorithm(JS::Realm& realm) | |||
| void HmacKeyAlgorithm::initialize(JS::Realm& realm) | ||||
| { | ||||
|     Base::initialize(realm); | ||||
|     define_native_accessor(realm, "hash"_fly_string, hash_getter, {}, JS::Attribute::Enumerable | JS::Attribute::Configurable); | ||||
|     define_native_accessor(realm, "length"_fly_string, length_getter, {}, JS::Attribute::Enumerable | JS::Attribute::Configurable); | ||||
|     define_native_accessor(realm, "hash"_utf16_fly_string, hash_getter, {}, JS::Attribute::Enumerable | JS::Attribute::Configurable); | ||||
|     define_native_accessor(realm, "length"_utf16_fly_string, length_getter, {}, JS::Attribute::Enumerable | JS::Attribute::Configurable); | ||||
| } | ||||
| 
 | ||||
| void HmacKeyAlgorithm::visit_edges(JS::Cell::Visitor& visitor) | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Timothy Flynn
						Timothy Flynn