Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Clean up how we use opIds #4118

Merged
merged 19 commits into from
Feb 25, 2020
Merged

Clean up how we use opIds #4118

merged 19 commits into from
Feb 25, 2020

Conversation

ry
Copy link
Member

@ry ry commented Feb 25, 2020

  • fetch_assets had two implementations: a binary and a JSON one. The JSON one was removed.

fixes #4122

cli/js/compiler_util.ts Outdated Show resolved Hide resolved
cli/js/runtime.ts Show resolved Hide resolved
cli/js/runtime.ts Show resolved Hide resolved
@@ -180,13 +180,15 @@ test(function sortingNonExistentParamRemovesQuestionMarkFromURL(): void {
assertEquals(url.search, "");
});

/*
test(function customInspectFunction(): void {
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For some unknown reason this test broke...

@ry ry requested a review from bartlomieju February 25, 2020 13:26
Copy link
Member

@bartlomieju bartlomieju left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So much cleaner 🎉

Comment on lines +392 to +397
if let Err(err) = r {
let s = format!("bad op id {}", err);
let msg = v8::String::new(scope, &s).unwrap();
scope.isolate().throw_exception(msg.into());
return;
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixes #4122

if zero_copy.is_none() {
return futures::future::err(no_buffer_specified()).boxed_local();
}
// TODO(ry) Probably poll_fn can be used here and the Write struct eliminated.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agreed 👍

Comment on lines +196 to +198
if (OP_WRITE < 0) {
OP_WRITE = OPS_CACHE["op_write"];
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I still suggest to test this path using regular lookup, but that can be done as an experiment in separate PR

@ry ry merged commit 91b606a into denoland:master Feb 25, 2020
dubiousjim added a commit to dubiousjim/deno that referenced this pull request Feb 26, 2020
* tag 'dm': (58 commits)
  Port permission_prompt_tests to Rust (denoland#4129)
  upgrade: TypeScript 3.8 (denoland#4100)
  Remove _async from method names since _sync are gone (denoland#4128)
  ci: Use fetch-depth: 5 (denoland#4127)
  fix: Resolve makeTemp* paths from CWD (denoland#4104)
  Clean up how we use opIds (denoland#4118)
  Fix issues with JavaScript importing JavaScript. (denoland#4120)
  fix: [http] Consume unread body and trailers before reading next request (denoland#3990)
  Remove ansi_term dependency (denoland#4116)
  port tools/repl_test.py to Rust (denoland#4096)
  Revert "Remove ansi_term dependency"
  fix: createSecKey logic (denoland#4063)
  Add Deno.Err change missing from previous commit (denoland#4113)
  rename Deno.Err -> Deno.errors (denoland#4093)
  doc: Remove old link to deno types output (denoland#4111)
  feat: Add Deno.formatDiagnostics (denoland#4032)
  disable std/examples/chat tests for windows (denoland#4109)
  update build instructions for windows (denoland#4027)
  Remove ansi_term dependency (denoland#4106)
  fix: add mutex guard for permission_prompt tests (denoland#4105)
  ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Handle missing opId gracefully
3 participants