feat(ecmascript): PlainTime.prototype.since + until#981
Draft
0Zeno wants to merge 1 commit intotrynova:mainfrom
Draft
feat(ecmascript): PlainTime.prototype.since + until#9810Zeno wants to merge 1 commit intotrynova:mainfrom
0Zeno wants to merge 1 commit intotrynova:mainfrom
Conversation
aapoalas
reviewed
Apr 14, 2026
| Agent, ArgumentsList, BUILTIN_STRING_MEMORY, Behaviour, Builtin, BuiltinGetter, JsResult, | ||
| PropertyKey, Realm, String, Value, builders::OrdinaryObjectBuilder, | ||
| builtins::temporal::plain_time::require_internal_slot_temporal_plain_time, | ||
| builtins::temporal::plain_time::{self, require_internal_slot_temporal_plain_time}, |
Member
There was a problem hiding this comment.
nitpick: self import accidentally. These like to appear.
aapoalas
reviewed
Apr 14, 2026
| // a. If item has an [[InitializedTemporalTime]] internal slot, then | ||
| if let Ok(time) = TemporalPlainTime::try_from(item) { | ||
| // i. Let resolvedOptions be ? GetOptionsObject(options). | ||
| let resolved_options = get_options_object(agent, options, gc.reborrow()).unbind()?; |
Member
There was a problem hiding this comment.
issue: GC can happen on this line and the line below: that would invalidate time. This shouldn't even pass compilation since item should be correctly bound here.
aapoalas
reviewed
Apr 14, 2026
| } | ||
|
|
||
| // b. If item has an [[InitializedTemporalDateTime]] internal slot, then | ||
| if let Ok(dt) = TemporalPlainTime::try_from(item) { |
Member
There was a problem hiding this comment.
issue: Remove these code lines - leave the comment lines. We don't have DateTime and ZonedDateTime yet.
aapoalas
reviewed
Apr 14, 2026
| let Ok(item) = String::try_from(item) else { | ||
| return Err(agent.throw_exception_with_static_message( | ||
| ExceptionType::TypeError, | ||
| "Item is not a String", |
Member
There was a problem hiding this comment.
nitpick: Message could be better.
aapoalas
reviewed
Apr 14, 2026
| // 1. Set other to ? ToTemporalTime(other). | ||
| let other = to_temporal_time(agent, other.unbind(), gc.reborrow()); | ||
| // 2. Let resolvedOptions be ? GetOptionsObject(options). | ||
| let resolved_option = get_options_object(agent, options.get(agent), gc.nogc()) |
Member
There was a problem hiding this comment.
nitpick: You can take options here.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.