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

context timeout restriction and 1.9 compatibility #14

Merged
merged 6 commits into from Apr 9, 2012

Conversation

kares
Copy link
Collaborator

@kares kares commented Feb 15, 2012

see the commits for details and as usual let me know if something bother your eye.
especially due jruby --1.9 incompatibilities a soonish release would be fine ...

@kares
Copy link
Collaborator Author

kares commented Apr 9, 2012

@cowboyd any chance we get a 1.9 compatible release soon ?

@cowboyd
Copy link
Collaborator

cowboyd commented Apr 9, 2012

Quick question: why not make the default restrictable?

@kares
Copy link
Collaborator Author

kares commented Apr 9, 2012

the genesis of restrictable would be, if I recall correctly:

  1. don't create a factory per context by default
  2. put the restrictions into a context sub-class + add a restrictable factory since there's a timeout_limit to be added
  3. add the timeout limit as the instruction limit ain't always enough (e.g. JS code might perform some setTimeout)

basically for most every day use it did not make much sense for the restrictable code to sit around + the code seems better manageable (with the timeout limit being added) to me when separated.
than of course I retained backwards compatibility - that's probably why you ask seeing this :

  def instruction_limit=(limit)
    if restrictable?
      @native.instruction_limit = limit
    else
      raise "setting an instruction_limit has no effect on this context, use " + 
            "Context.open(:restricted => true) to gain a restrictable instance"
    end
  end

cowboyd added a commit that referenced this pull request Apr 9, 2012
context timeout restriction and 1.9 compatibility
@cowboyd cowboyd merged commit 0dd3f7e into rubyjs:master Apr 9, 2012
@kares
Copy link
Collaborator Author

kares commented Apr 11, 2012

@cowboyd could we also get out 1.73.2 release of master please (if you do not have more plans for it) ... thanks

@cowboyd
Copy link
Collaborator

cowboyd commented Apr 11, 2012

Done. Thanks!

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.

None yet

2 participants