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

Ak 18468 #18546

Closed
wants to merge 5 commits into from
Closed

Ak 18468 #18546

Changes from 1 commit
Commits
File filter...
Filter file types
Jump to…
Jump to file
Failed to load files.

Always

Just for now

use RUST_JSID_IS_STRING in if condition.

  • Loading branch information
toidiu
toidiu committed Sep 17, 2017
commit 7ccd2c7eb3c253b809b2f66b6551cb6a3fb162dc
@@ -4750,8 +4750,7 @@ def __init__(self, descriptor, name):
def define(self):
# Our first argument is the id we're getting.
argName = self.arguments[0].identifier.name
return ("println!(\"===DEBUG-o-o-o-7 {:?}\", jsid_to_string(cx, id) );\n"
"if jsid_to_string(cx, id).is_none() {\n"
return ("if !RUST_JSID_IS_STRING(id) {\n"
" return false\n"
"}\n"
"let %s = string_jsid_to_string(cx, id);\n"
@@ -141,8 +141,6 @@ impl <T: FromJSValConvertible + JSTraceable> FromJSValConvertible for RootedTrac
/// Panics if `id` is not string-valued.
pub fn string_jsid_to_string(cx: *mut JSContext, id: HandleId) -> DOMString {
unsafe {
println!("===DEBUG-o-o-o-1 {:?}", jsid_to_string(cx, id) );
println!("===DEBUG-o-o-o-2 {:?}", jsid_to_string(cx, id).is_some() );
assert!(RUST_JSID_IS_STRING(id));
jsstring_to_str(cx, RUST_JSID_TO_STRING(id))
}
ProTip! Use n and p to navigate between commits in a pull request.
You can’t perform that action at this time.