Skip to content

Commit

Permalink
tmp
Browse files Browse the repository at this point in the history
  • Loading branch information
jdm committed Apr 4, 2019
1 parent 80df25b commit 5d21cd6
Show file tree
Hide file tree
Showing 8 changed files with 35 additions and 5 deletions.
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -30,5 +30,5 @@ libc = "0.2"
libz-sys = "1.0"

[build-dependencies]
bindgen = "0.46"
bindgen = "0.49"
cc = "1.0"
4 changes: 4 additions & 0 deletions build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ fn cc_flags() -> Vec<&'static str> {
"-fno-sized-deallocation",
"-Wno-unused-parameter",
"-Wno-invalid-offsetof",
"-Wno-unused-private-field",
]);
}

Expand Down Expand Up @@ -334,6 +335,9 @@ const BLACKLIST_TYPES: &'static [&'static str] = &[
// Bindgen generates bitfields with private fields, so they cannot
// be used in const expressions.
"JSJitInfo",
// Declared as a constexpr, and clang doesn't expose aggregate initializations,
// so it causes a link error.
"JSID_VOID",
];

/// Definitions for types that were blacklisted
Expand Down
10 changes: 10 additions & 0 deletions etc/patches/missing-cargon-in-vendored.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
diff --git a/mozjs/third_party/rust/argon2rs/Cargo.toml b/mozjs/third_party/rust/argon2rs/Cargo.toml
index 1235e46e0d..4785ba616e 100644
--- a/mozjs/third_party/rust/argon2rs/Cargo.toml
+++ b/mozjs/third_party/rust/argon2rs/Cargo.toml
@@ -18,4 +18,4 @@ blake2-rfc = "0.2.16"
scoped_threadpool = "0.1.7"

[dev-dependencies]
-cargon = { path = "benches/cargon", version = "0.0.1" }
+#cargon = { path = "benches/cargon", version = "0.0.1" }
2 changes: 1 addition & 1 deletion mozjs/third_party/rust/argon2rs/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,4 @@ blake2-rfc = "0.2.16"
scoped_threadpool = "0.1.7"

[dev-dependencies]
cargon = { path = "benches/cargon", version = "0.0.1" }
#cargon = { path = "benches/cargon", version = "0.0.1" }
2 changes: 1 addition & 1 deletion mozjs/third_party/rust/bzip2/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ categories = ["compression", "api-bindings"]

[dependencies]
libc = "0.2"
bzip2-sys = { version = "0.1", path = "bzip2-sys" }
bzip2-sys = { version = "0.1", path = "../bzip2-sys" }
tokio-io = { version = "0.1", optional = true }
futures = { version = "0.1", optional = true }

Expand Down
4 changes: 3 additions & 1 deletion src/jsgc.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ use jsapi::JS;
use jsapi::jsid;
use jsapi::JSFlatString;
use jsapi::JSFunction;
use jsapi::JSID_VOID;
use jsapi::JSObject;
use jsapi::JSScript;
use jsapi::JSString;
Expand Down Expand Up @@ -90,6 +89,9 @@ pub trait GCMethods {
unsafe fn post_barrier(v: *mut Self, prev: Self, next: Self);
}

const JSID_TYPE_VOID: usize = 0x2;
const JSID_VOID: jsid = jsid { asBits: JSID_TYPE_VOID };

impl GCMethods for jsid {
unsafe fn initial() -> jsid { JSID_VOID }
unsafe fn post_barrier(_: *mut jsid, _: jsid, _: jsid) {}
Expand Down
15 changes: 14 additions & 1 deletion src/jsglue.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,25 @@

#include "jsapi.h"
#include "jsfriendapi.h"
#include "js/BuildId.h"
#include "js/CompilationAndEvaluation.h"
#include "js/ContextOptions.h"
#include "js/Conversions.h"
#include "js/Date.h"
#include "js/Equality.h"
#include "js/Id.h"
#include "js/Initialization.h"
#include "js/JSON.h"
#include "js/MemoryMetrics.h"
#include "js/Promise.h"
#include "js/PropertySpec.h"
#include "js/CompilationAndEvaluation.h"
#include "js/Realm.h"
#include "js/SavedFrameAPI.h"
#include "js/SourceText.h"
#include "js/Stream.h"
#include "js/StructuredClone.h"
#include "js/Symbol.h"
#include "js/Utility.h"

// Reexport some functions that are marked inline.

Expand Down
1 change: 1 addition & 0 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */

extern crate libc;
#[allow(unused_extern_crates)]
extern crate libz_sys;

// The jsimpls module just implements traits so can be private
Expand Down

0 comments on commit 5d21cd6

Please sign in to comment.