Canvas going out of context on Google Chrome only, cannot get '2d' context

roiG is a global variable that holds a canvas element. It is initialized like so:

var roiG = document.getElementById("roiCanvasPull");

Elsewhere in the code roiG gets assigned to which, changes the canvas element.

Here is a block of code that I wrote to show what is happening.

    console.log(roiG);      
    try{
        roiG.getContext('2d').clearRect( 0, 0, roiG.width, roiG.height );
    }catch(e){
        console.log(e);
    }

and here's the output from chrome:

enter image description here

As you can see, the element is within scope at the console.log. This particular canvas already been drawn to so a '2d' context has previously been grabbed on the exact same canvas.

Actual affected code:

function roiSquare( x, y, width, height ){

this.x = x;
this.y = y;
this.width = width;
this.height = height;
this.highlighted = false;

//var context = this.roiG.getContext('2d');

this.draw = function(){
    var context = roiG.getContext("2d");
    context.strokeStyle = "#000000";
    context.beginPath();
    context.rect( this.x * this.width, this.y * this.height, this.width, this.height );
    context.stroke();
    context.closePath();
}

this.highlight = function(){
    var context = roiG.getContext("2d");
    context.strokeStyle = "#FFFF00";
    var bright;
    for( bright = 0; bright < 5; bright ++ ){
        context.beginPath();
        context.rect( this.x * this.width, this.y * this.height, this.width, this.height );
        context.stroke();
        context.closePath();
    }
    this.highlighted = true;
}

}