servo icon indicating copy to clipboard operation
servo copied to clipboard

Replace callargs_is_constructing with a method on CallArgs

Open jdm opened this issue 2 years ago • 3 comments

I added it as a function in utils.rs for expediency, but it belongs in https://github.com/servo/mozjs/blob/b9edc816b6662a5986e190cdf53ae295049acb92/mozjs/src/jsimpls.rs#L221 instead.

jdm avatar Jun 01 '23 03:06 jdm

I would like to work on this issue. Let me confirm what we would like to do before starting to work on it.

What we need to do is,

  1. Add a new method is_constructing that is equivalent to callargs_is_constructing to JS::CallArgs https://github.com/servo/mozjs/blob/573f19426041ec6e1c166da71c0320257d1bd660/mozjs-sys/src/jsimpls.rs#L304
  2. Replace all the usage of callargs_is_constructing in servo/servo like callargs_is_constructing(args) -> args.is_constructing()

Do I understand correctly?

saito828koki avatar Aug 17 '24 10:08 saito828koki

Correct!

jdm avatar Aug 17 '24 11:08 jdm

Thank you! Made a PR in mozjs repo.

saito828koki avatar Aug 17 '24 11:08 saito828koki